Commit cd2c8fd5 by Calcium-Ion Committed by GitHub

Merge pull request #886 from seefs001/main

fix: claude function calling type
parents 18b5122a f501a3e9
...@@ -70,7 +70,9 @@ func RequestOpenAI2ClaudeMessage(textRequest dto.GeneralOpenAIRequest) (*dto.Cla ...@@ -70,7 +70,9 @@ func RequestOpenAI2ClaudeMessage(textRequest dto.GeneralOpenAIRequest) (*dto.Cla
Description: tool.Function.Description, Description: tool.Function.Description,
} }
claudeTool.InputSchema = make(map[string]interface{}) claudeTool.InputSchema = make(map[string]interface{})
claudeTool.InputSchema["type"] = params["type"].(string) if params["type"] != nil {
claudeTool.InputSchema["type"] = params["type"].(string)
}
claudeTool.InputSchema["properties"] = params["properties"] claudeTool.InputSchema["properties"] = params["properties"]
claudeTool.InputSchema["required"] = params["required"] claudeTool.InputSchema["required"] = params["required"]
for s, a := range params { for s, a := range params {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment