Skip to content

Add tool_choice to ChatCompletionClient create and create_stream method #6696

Closed
@ekzhu

Description

@ekzhu

Issue body

The tool_choice parameter should accept the following:

  • a list of strings corresponding to the names of the tools that will be provided to the model as the choices
  • a list of Tool types, which also will be converted to a list of strings as their names to be used as the choices

For each model client implementation, use the model API’s convention for the actual create argument passed to the model API. For example, the argument name is tool_choice for OpenAI API.

Related #6695

Metadata

Metadata

Assignees

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