add custom tool (#2157)

This commit is contained in:
Seefs
2025-11-06 20:18:25 +08:00
committed by GitHub
parent fb610e62a0
commit 96a2b81aaa

View File

@@ -232,10 +232,13 @@ func (r *GeneralOpenAIRequest) GetSystemRoleName() string {
return "system" return "system"
} }
const CustomType = "custom"
type ToolCallRequest struct { type ToolCallRequest struct {
ID string `json:"id,omitempty"` ID string `json:"id,omitempty"`
Type string `json:"type"` Type string `json:"type"`
Function FunctionRequest `json:"function"` Function FunctionRequest `json:"function,omitempty"`
Custom json.RawMessage `json:"custom,omitempty"`
} }
type FunctionRequest struct { type FunctionRequest struct {