You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When AiMessage contains both text and toolCalls, next time it is sent to the LLM again in a list of messages, only toolCalls is present.
Log and Stack trace Response:
{
"id": "chatcmpl-9Fel2FjEBshnmq0c4wiEtOgnJRHnT",
"object": "chat.completion",
"created": 1713518620,
"model": "gpt-3.5-turbo-0125",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "I encountered an issue while trying to add the word \"haben\" to your vocabulary. Let me try that again.",
"tool_calls": [
{
"id": "call_nZ6wMhj9MXkch4zBPKGcd3xS",
"type": "function",
"function": {
"name": "addWordToVocabulary",
"arguments": "{\"arg1\":\"haben\"}"
}
}
]
},
"logprobs": null,
"finish_reason": "tool_calls"
}
],
"usage": {
"prompt_tokens": 109,
"completion_tokens": 44,
"total_tokens": 153
},
"system_fingerprint": "fp_d9767fc5b9"
}
Describe the bug
When
AiMessage
contains bothtext
andtoolCalls
, next time it is sent to the LLM again in a list of messages, onlytoolCalls
is present.Log and Stack trace
Response:
Next request:
To Reproduce
Return an error from a tool call, so that LLM needs to retry.
Expected behavior
Text content should not be lost.
Please complete the following information:
The text was updated successfully, but these errors were encountered: