From 7028ade85b26f87f266a5567836ca7de0992ebbe Mon Sep 17 00:00:00 2001 From: Seefs Date: Mon, 3 Nov 2025 19:01:59 +0800 Subject: [PATCH] add custom tool --- dto/openai_request.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dto/openai_request.go b/dto/openai_request.go index 0b8b5dc54cd9..75b30b865163 100644 --- a/dto/openai_request.go +++ b/dto/openai_request.go @@ -232,10 +232,13 @@ func (r *GeneralOpenAIRequest) GetSystemRoleName() string { return "system" } +const CustomType = "custom" + type ToolCallRequest struct { ID string `json:"id,omitempty"` Type string `json:"type"` - Function FunctionRequest `json:"function"` + Function FunctionRequest `json:"function,omitempty"` + Custom json.RawMessage `json:"custom,omitempty"` } type FunctionRequest struct {