Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tool choice definition, call options add tools and tool choice #48

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

N3kox
Copy link
Contributor

@N3kox N3kox commented Jan 21, 2025

feat: add tool choice definition, call options add tools and tool choice

What type of PR is this?

feat

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
Add chat model tool choice definition and enums.
Common call options for chat model now supports passing tools and tool choice.

zh(optional):
新增 tool choice 定义与枚举值
Chat model 通用 call options 支持传递 tools 和 tool choice

(Optional) Which issue(s) this PR fixes:

(optional) The PR that updates user documentation:

Copy link

github-actions bot commented Jan 21, 2025

📊 Coverage Report:

File coverage threshold (20%) satisfied:	PASS
Package coverage threshold (30%) satisfied:	PASS
Total coverage threshold (75%) satisfied:	PASS
Total test coverage: 84.1% (3290/3913)


const (
// ToolChoiceForbidden indicates that the model should not call any tools.
// Corresponds to "none" in OpenAI Chat Completion.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里不提 OpenAI 了吧,提了 OpenAI 要提 Claude 或者 Gemini 吗,干脆都不提了

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

我觉得还是有必要说下的,也没必要全都说一遍。不同 api 在这个字段上的定义都是相似的

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

Successfully merging this pull request may close these issues.

2 participants