langchain/libs
Jacob Lee 181a61982f
anthropic[minor]: Adds streaming tool call support for Anthropic (#22687)
Preserves string content chunks for non tool call requests for
convenience.

One thing - Anthropic events look like this:

```
RawContentBlockStartEvent(content_block=TextBlock(text='', type='text'), index=0, type='content_block_start')
RawContentBlockDeltaEvent(delta=TextDelta(text='<thinking>\nThe', type='text_delta'), index=0, type='content_block_delta')
RawContentBlockDeltaEvent(delta=TextDelta(text=' provide', type='text_delta'), index=0, type='content_block_delta')
...
RawContentBlockStartEvent(content_block=ToolUseBlock(id='toolu_01GJ6x2ddcMG3psDNNe4eDqb', input={}, name='get_weather', type='tool_use'), index=1, type='content_block_start')
RawContentBlockDeltaEvent(delta=InputJsonDelta(partial_json='', type='input_json_delta'), index=1, type='content_block_delta')
```

Note that `delta` has a `type` field. With this implementation, I'm
dropping it because `merge_list` behavior will concatenate strings.

We currently have `index` as a special field when merging lists, would
it be worth adding `type` too?

If so, what do we set as a context block chunk? `text` vs.
`text_delta`/`tool_use` vs `input_json_delta`?

CC @ccurme @efriis @baskaryan
2024-06-14 09:14:43 -07:00
..
cli cli[patch]: Release 0.0.25 (#22876) 2024-06-14 02:31:04 +00:00
community [Community]: HuggingFaceCrossEncoder score accounting for <not-relevant score,relevant score> pairs. (#22578) 2024-06-14 08:28:24 -07:00
core core: release 0.2.6 (#22868) 2024-06-13 22:22:34 +00:00
experimental Fix: lint errors and update Field alias in models.py and AutoSelectionScorer initialization (#22846) 2024-06-13 18:18:00 -07:00
langchain docs: ReAct reference (#22830) 2024-06-13 19:39:28 -07:00
partners anthropic[minor]: Adds streaming tool call support for Anthropic (#22687) 2024-06-14 09:14:43 -07:00
standard-tests multiple: add stop attribute (#22573) 2024-06-06 12:11:52 -04:00
text-splitters Community[minor]: Add language parser for Elixir (#22742) 2024-06-10 15:56:57 +00:00