Skip to content

Deepseek API 400 error when role=tool #520

@hqsow

Description

@hqsow

[ { "role": "user", "content": "请阅读我的文档" }, { "role": "assistant", "content": "我来帮您读取当前的文档内容。", "tool_calls": [ { "id": "call_00_IhNDqplrzL8xiABtVfI2K7hz", "name": "ReadDoc", "arguments": "{\"format\": \"structured\"}" } ] }, { "role": "tool", "content": "xxxx", "tool_call_id": "call_00_IhNDqplrzL8xiABtVfI2K7hz" } ]

以上 messages 发送到 deepseek api 必报400,但是一把 role:tool 改成 role:user 就能正常,请问是为什么?
难道deepseek不支持role=tool?不应该啊,我看官网文档自已都有用

400 error happens when The above message was send to Deepseek API, but it works when change role:tool to role:user, whY?

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