feat(shared-chat): support allowed_tools in tool_choice

This commit is contained in:
藍+85CD committed 2025-08-12 23:21:27 +08:00
1 parent abcfb0b57f
commit dc3a28d268
1 file changed
+14 -2
+14 -2
View File
@@ -1,4 +1,16 @@
export type ToolChoice = 'auto' | 'none' | 'required' | {
function: { name: string }
export type ToolChoice = AllowedTools | ToolChoiceMode | ToolChoiceTool
interface AllowedTools {
mode: 'auto' | 'required'
tools: ToolChoiceTool[]
type: 'allowed_tools'
}
type ToolChoiceMode = 'auto' | 'none' | 'required'
interface ToolChoiceTool {
function: {
name: string
}
type: 'function'
}