Skip to content

Conversation

sigoden
Copy link
Owner

@sigoden sigoden commented Jun 23, 2025

Some LLM providers have issues with messages that have a tool_calls field but a null content. This PR fixes the issue by removing the content field.

    {
      "role": "assistant",
-     "content": null,
      "tool_calls": [
        {
          "id": "call_46bf3500093a41d8b8f842",
          "type": "function",
          "function": {
            "name": "get_current_weather",
            "arguments": "{\"location\":\"Paris\"}"
          }
        }
      ]
    }

Copy link

@g19fanatic g19fanatic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Thank you again!

@sigoden sigoden merged commit ffcb19d into main Jun 23, 2025
3 checks passed
@sigoden sigoden deleted the fix branch June 23, 2025 03:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants