mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-03 13:00:52 +08:00
23 lines
666 B
Go
23 lines
666 B
Go
package gemini
|
|
|
|
import (
|
|
. "github.com/router-for-me/CLIProxyAPI/v6/internal/constant"
|
|
"github.com/router-for-me/CLIProxyAPI/v6/internal/interfaces"
|
|
"github.com/router-for-me/CLIProxyAPI/v6/internal/translator/translator"
|
|
)
|
|
|
|
// Register a no-op response translator and a request normalizer for Gemini→Gemini.
|
|
// The request converter ensures missing or invalid roles are normalized to valid values.
|
|
func init() {
|
|
translator.Register(
|
|
Gemini,
|
|
Gemini,
|
|
ConvertGeminiRequestToGemini,
|
|
interfaces.TranslateResponse{
|
|
Stream: PassthroughGeminiResponseStream,
|
|
NonStream: PassthroughGeminiResponseNonStream,
|
|
TokenCount: GeminiTokenCount,
|
|
},
|
|
)
|
|
}
|