mirror of
https://github.com/router-for-me/CLIProxyAPI.git
synced 2026-02-18 04:10:51 +08:00
- Updated all `github.com/luispater/CLIProxyAPI/internal/...` imports to point to `github.com/luispater/CLIProxyAPI/v5/internal/...`. - Adjusted `go.mod` to specify `module github.com/luispater/CLIProxyAPI/v5`.
22 lines
619 B
Go
22 lines
619 B
Go
package gemini
|
|
|
|
import (
|
|
. "github.com/luispater/CLIProxyAPI/v5/internal/constant"
|
|
"github.com/luispater/CLIProxyAPI/v5/internal/interfaces"
|
|
"github.com/luispater/CLIProxyAPI/v5/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,
|
|
},
|
|
)
|
|
}
|