mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-02 20:40:52 +08:00
- Refactored response translation logic to support mixed content types (`input_text`, `output_text`, `input_image`) with better role assignments and part handling. - Added image processing logic for embedding inline data with MIME type and base64 encoded content. - Updated Antigravity request conversion to replace Gemini CLI references for consistency.
15 lines
510 B
Go
15 lines
510 B
Go
package responses
|
|
|
|
import (
|
|
"bytes"
|
|
|
|
. "github.com/router-for-me/CLIProxyAPI/v6/internal/translator/antigravity/gemini"
|
|
. "github.com/router-for-me/CLIProxyAPI/v6/internal/translator/gemini/openai/responses"
|
|
)
|
|
|
|
func ConvertOpenAIResponsesRequestToAntigravity(modelName string, inputRawJSON []byte, stream bool) []byte {
|
|
rawJSON := bytes.Clone(inputRawJSON)
|
|
rawJSON = ConvertOpenAIResponsesRequestToGemini(modelName, rawJSON, stream)
|
|
return ConvertGeminiRequestToAntigravity(modelName, rawJSON, stream)
|
|
}
|