feat: convert gemini format to openai chat completions

This commit is contained in:
creamlike1024
2025-08-01 22:23:35 +08:00
parent 9758a9e60d
commit d2183af23f
36 changed files with 648 additions and 66 deletions

View File

@@ -44,6 +44,10 @@ type Adaptor struct {
AccountCredentials Credentials
}
func (a *Adaptor) ConvertGeminiRequest(c *gin.Context, info *relaycommon.RelayInfo, request *dto.GeminiChatRequest) (any, error) {
return request, nil
}
func (a *Adaptor) ConvertClaudeRequest(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest) (any, error) {
if v, ok := claudeModelMap[info.UpstreamModelName]; ok {
c.Set("request_model", v)