You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
langchain/libs/partners/groq/tests/integration_tests
ccurme 74c7198906
core, anthropic[patch]: support streaming tool calls when function has no arguments (#23915)
resolves https://github.com/langchain-ai/langchain/issues/23911

When an AIMessageChunk is instantiated, we attempt to parse tool calls
off of the tool_call_chunks.

Here we add a special-case to this parsing, where `""` will be parsed as
`{}`.

This is a reaction to how Anthropic streams tool calls in the case where
a function has no arguments:
```
{'id': 'toolu_01J8CgKcuUVrMqfTQWPYh64r', 'input': {}, 'name': 'magic_function', 'type': 'tool_use', 'index': 1}
{'partial_json': '', 'type': 'tool_use', 'index': 1}
```
The `partial_json` does not accumulate to a valid json string-- most
other providers tend to emit `"{}"` in this case.
3 months ago
..
__init__.py partner: Add groq partner integration and chat model (#17856) 7 months ago
test_chat_models.py infra: update mypy 1.10, ruff 0.5 (#23721) 3 months ago
test_compile.py partner: Add groq partner integration and chat model (#17856) 7 months ago
test_standard.py core, anthropic[patch]: support streaming tool calls when function has no arguments (#23915) 3 months ago