Skip to content

ERROR Error parsing response #48

Description

@eric2788

model: claude-3.7-sonnet
log:

INFO:     172.17.0.1:43416 - "POST /v1/chat/completions HTTP/1.1" 200 OK

2025-02-26T10:26:04.280148+0000 ERROR Error parsing response: {"choices":[{"finish_reason":"tool_calls","message":{"content":"I need to complete this text as a search query. Let me analyze what would be a natural continuation for this search query.","role":"assistant"}},{"finish_reason":"tool_calls","message":{"role":"assistant","tool_calls":[{"function":{"arguments":"{\"url\":\"https://www.google.com/search?q=9.11+and+9.9+which+is+bigger\"}","name":"fetch"},"id":"toolu_xxxxxxxxxxxx","type":"function"}]}}],"created":1740565563,"id":"msg_bdrk_xxxxxxxxx","model":"claude-3.7-sonnet","usage":{"prompt_tokens":1066,"total_tokens":103}}

2025-02-26T10:26:04.280808+0000 ERROR 4 validation errors for CreateChatCompletionResponse

choices.0.index

  Field required [type=missing, input_value={'finish_reason': 'tool_c...', 'role': 'assistant'}}, input_type=dict]

    For further information visit https://errors.pydantic.dev/2.10/v/missing

choices.1.index

  Field required [type=missing, input_value={'finish_reason': 'tool_c..., 'type': 'function'}]}}, input_type=dict]

    For further information visit https://errors.pydantic.dev/2.10/v/missing

object

  Field required [type=missing, input_value={'choices': [{'finish_rea...6, 'total_tokens': 103}}, input_type=dict]

    For further information visit https://errors.pydantic.dev/2.10/v/missing

usage.completion_tokens

  Field required [type=missing, input_value={'prompt_tokens': 1066, 'total_tokens': 103}, input_type=dict]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions