mirror of
https://github.com/hwchase17/langchain.git
synced 2026-06-09 10:17:00 +00:00
partners(mistralai): Removing unused variable in completion request (using tool_calls or content) (#21201)
This PR fixes #21196. The error was occurring when calling chat completion API with a chat history. Indeed, the Mistral API does not accept both `content` and `tool_calls` in the same body. This PR removes one of theses variables depending on the necessity. --------- Co-authored-by: Maxime Perrin <mperrin@doing.fr> Co-authored-by: Chester Curme <chester.curme@gmail.com>
This commit is contained in:
@@ -55,7 +55,7 @@ def test_mistralai_initialization() -> None:
|
||||
),
|
||||
(
|
||||
AIMessage(content="Hello"),
|
||||
dict(role="assistant", content="Hello", tool_calls=[]),
|
||||
dict(role="assistant", content="Hello"),
|
||||
),
|
||||
(
|
||||
ChatMessage(role="assistant", content="Hello"),
|
||||
|
||||
Reference in New Issue
Block a user