|
@@ -186,17 +186,12 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest, info *relaycommon
|
|
|
} else if val, exists := tool_call_ids[message.ToolCallId]; exists {
|
|
} else if val, exists := tool_call_ids[message.ToolCallId]; exists {
|
|
|
name = val
|
|
name = val
|
|
|
}
|
|
}
|
|
|
- content := common.StrToMap(message.StringContent())
|
|
|
|
|
|
|
+ contentMap := common.StrToMap(message.StringContent())
|
|
|
functionResp := &FunctionResponse{
|
|
functionResp := &FunctionResponse{
|
|
|
- Name: name,
|
|
|
|
|
- Response: GeminiFunctionResponseContent{
|
|
|
|
|
- Name: name,
|
|
|
|
|
- Content: content,
|
|
|
|
|
- },
|
|
|
|
|
- }
|
|
|
|
|
- if content == nil {
|
|
|
|
|
- functionResp.Response.Content = message.StringContent()
|
|
|
|
|
|
|
+ Name: name,
|
|
|
|
|
+ Response: contentMap,
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
*parts = append(*parts, GeminiPart{
|
|
*parts = append(*parts, GeminiPart{
|
|
|
FunctionResponse: functionResp,
|
|
FunctionResponse: functionResp,
|
|
|
})
|
|
})
|