@@ -265,18 +265,18 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest, info *relaycommon
}
}
functionResp:=&FunctionResponse{
functionResp:=&dto.GeminiFunctionResponse{
Name:name,
Response:contentMap,
}
*parts=append(*parts,GeminiPart{
*parts=append(*parts,dto.GeminiPart{
FunctionResponse:functionResp,
})
continue
}
varparts[]GeminiPart
content:=GeminiChatContent{
varparts[]dto.GeminiPart
content:=dto.GeminiChatContent{
Role:message.Role,
}
// isToolCall := false
...
...
@@ -290,8 +290,8 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest, info *relaycommon
returnnil,fmt.Errorf("invalid arguments for function %s, args: %s",call.Function.Name,call.Function.Arguments)
}
}
toolCall:=GeminiPart{
FunctionCall:&FunctionCall{
toolCall:=dto.GeminiPart{
FunctionCall:&dto.FunctionCall{
FunctionName:call.Function.Name,
Arguments:args,
},
...
...
@@ -308,7 +308,7 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest, info *relaycommon
ifpart.Text==""{
continue
}
parts=append(parts,GeminiPart{
parts=append(parts,dto.GeminiPart{
Text:part.Text,
})
}elseifpart.Type==dto.ContentTypeImageURL{
...
...
@@ -331,8 +331,8 @@ func CovertGemini2OpenAI(textRequest dto.GeneralOpenAIRequest, info *relaycommon
returnnil,fmt.Errorf("mime type is not supported by Gemini: '%s', url: '%s', supported types are: %v",fileData.MimeType,url,getSupportedMimeTypesList())