Browse Source

feat: comment out model validation in ConvertClaudeRequest method

CaIon 6 months ago
parent
commit
75b486b467
1 changed files with 3 additions and 3 deletions
  1. 3 3
      relay/channel/openai/adaptor.go

+ 3 - 3
relay/channel/openai/adaptor.go

@@ -35,9 +35,9 @@ type Adaptor struct {
 }
 
 func (a *Adaptor) ConvertClaudeRequest(c *gin.Context, info *relaycommon.RelayInfo, request *dto.ClaudeRequest) (any, error) {
-	if !strings.Contains(request.Model, "claude") {
-		return nil, fmt.Errorf("you are using openai channel type with path /v1/messages, only claude model supported convert, but got %s", request.Model)
-	}
+	//if !strings.Contains(request.Model, "claude") {
+	//	return nil, fmt.Errorf("you are using openai channel type with path /v1/messages, only claude model supported convert, but got %s", request.Model)
+	//}
 	aiRequest, err := service.ClaudeToOpenAIRequest(*request, info)
 	if err != nil {
 		return nil, err