diff --git a/relay/channel/gemini/relay-gemini.go b/relay/channel/gemini/relay-gemini.go index dda84084d..01f21b312 100644 --- a/relay/channel/gemini/relay-gemini.go +++ b/relay/channel/gemini/relay-gemini.go @@ -296,7 +296,8 @@ func getToolCall(item *GeminiPart) *dto.ToolCall { ID: fmt.Sprintf("call_%s", common.GetUUID()), Type: "function", Function: dto.FunctionCall{ - Arguments: string(argsBytes), + // 不好评价,得去转义一下反斜杠,Gemini 的特性好像是,Google 返回的时候本身就会转义“\” + Arguments: strings.ReplaceAll(string(argsBytes), "\\\\", "\\"), Name: item.FunctionCall.FunctionName, }, }