+
Skip to content

Should the tool_choice be set to None when the tools parameter is empty? #142

@JIAQIA

Description

@JIAQIA

Currently, the API raises an error when I set "tool_choice" to {"type": "none"} while the tools parameter is empty.

I think this behavior makes sense in most cases. However, there is a scenario where I describe tool information in a private prompt, such as a system prompt. Sometimes, based on the code context, I want to explicitly forbid function calls.

It's easy for me to set tool_choice to {"type": "none"} because it's a structured parameter. On the other hand, modifying the system prompt is more difficult since it's written in natural language.

So, will Anthropic allow setting tool_choice to "none" even when tools is not empty in the future?

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

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载