Skip to content

Error when trying to use Tools #76

@ermiri

Description

@ermiri

I am trying to run a prompt which invokes a tool call:
list all appointment types

It calls the right Tool named 'appointment_type_all' and get result, but it fails with the error:
Client error: POST https://api.openai.com/v1/chat/completions` resulted in a 400 Bad Request response:\n{\n "error": {\n "message": "Missing required parameter: 'messages[5].content[0].type'.",\n "type": "invalid_request (truncated...)`

You can check the history:
[ { "role": "user", "content": "list all appointment types" }, { "tool_calls": [ { "id": "call_eVIlLw07omPjkB7sG2TLdwHC", "type": "function", "function": { "name": "appointment_type_all", "arguments": "{}" } } ], "role": "assistant", "content": null, "usage": { "input_tokens": 750, "output_tokens": 13 }, "type": "tool_call", "tools": [ { "name": "appointment_type_all", "description": "Retrieve all appointment types from system or database.", "inputs": {}, "callId": "call_eVIlLw07omPjkB7sG2TLdwHC", "result": [ { "id": 1, "application_id": 1, "created_by": null, "created_at": "2024-07-25T14:01:06.000000Z", "updated_at": "2024-07-25T14:01:06.000000Z", "disabled": 0, "name": "Control", "is_inpatient": 0, "default_duration": null, "color": "#000000", "class_color": null, "description": null, "service_items_list": null }, { "id": 2, "application_id": 1, "created_by": null, "created_at": "2024-07-25T14:01:06.000000Z", "updated_at": "2024-07-25T14:01:06.000000Z", "disabled": 0, "name": "Konsulte", "is_inpatient": 0, "default_duration": null, "color": "#000000", "class_color": null, "description": null, "service_items_list": null } ] } ] }, { "role": "user", "content": null, "type": "tool_call_result", "tools": [ { "name": "appointment_type_all", "description": "Retrieve all appointment types from system or database.", "inputs": {}, "callId": "call_eVIlLw07omPjkB7sG2TLdwHC", "result": [ { "id": 1, "application_id": 1, "created_by": null, "created_at": "2024-07-25T14:01:06.000000Z", "updated_at": "2024-07-25T14:01:06.000000Z", "disabled": 0, "name": "Control", "is_inpatient": 0, "default_duration": null, "color": "#000000", "class_color": null, "description": null, "service_items_list": null }, { "id": 2, "application_id": 1, "created_by": null, "created_at": "2024-07-25T14:01:06.000000Z", "updated_at": "2024-07-25T14:01:06.000000Z", "disabled": 0, "name": "Konsulte", "is_inpatient": 0, "default_duration": null, "color": "#000000", "class_color": null, "description": null, "service_items_list": null } ] } ] } ]

  • Version 1.9.29

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions