d9ad65622a
- Renamed constants from uppercase to CamelCase for consistency. - Replaced redundant file-based auth handling logic with the new `util.CountAuthFiles` helper. - Fixed various error-handling inconsistencies and enhanced robustness in file operations. - Streamlined auth client reload logic in server and watcher components. - Applied minor code readability improvements across multiple packages.
22 lines
631 B
Go
22 lines
631 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,
|
|
},
|
|
)
|
|
}
|