38 lines
979 B
Go
38 lines
979 B
Go
package interactions
|
|
|
|
import (
|
|
. "github.com/router-for-me/CLIProxyAPI/v7/internal/constant"
|
|
"github.com/router-for-me/CLIProxyAPI/v7/internal/interfaces"
|
|
"github.com/router-for-me/CLIProxyAPI/v7/internal/translator/translator"
|
|
)
|
|
|
|
func init() {
|
|
translator.Register(
|
|
Interactions,
|
|
Interactions,
|
|
ConvertInteractionsRequestToInteractions,
|
|
interfaces.TranslateResponse{
|
|
Stream: ConvertInteractionsResponsePassthrough,
|
|
NonStream: ConvertInteractionsResponsePassthroughNonStream,
|
|
},
|
|
)
|
|
translator.Register(
|
|
Interactions,
|
|
Gemini,
|
|
ConvertInteractionsRequestToGemini,
|
|
interfaces.TranslateResponse{
|
|
Stream: ConvertGeminiResponseToInteractions,
|
|
NonStream: ConvertGeminiResponseToInteractionsNonStream,
|
|
},
|
|
)
|
|
translator.Register(
|
|
Gemini,
|
|
Interactions,
|
|
ConvertGeminiRequestToInteractions,
|
|
interfaces.TranslateResponse{
|
|
Stream: ConvertInteractionsResponseToGemini,
|
|
NonStream: ConvertInteractionsResponseToGeminiNonStream,
|
|
},
|
|
)
|
|
}
|