diff --git a/README.md b/README.md index 498d7c6c..05423548 100644 --- a/README.md +++ b/README.md @@ -27,9 +27,6 @@ GoReportCard - - CodeRabbit Pull Request Reviews -

diff --git a/common/endpoint_type.go b/common/endpoint_type.go index 58936eea..578fe096 100644 --- a/common/endpoint_type.go +++ b/common/endpoint_type.go @@ -8,14 +8,14 @@ func GetEndpointTypesByChannelType(channelType int, modelName string) []constant switch channelType { case constant.ChannelTypeJina: endpointTypes = []constant.EndpointType{constant.EndpointTypeJinaRerank} - case constant.ChannelTypeMidjourney, constant.ChannelTypeMidjourneyPlus: - endpointTypes = []constant.EndpointType{constant.EndpointTypeMidjourney} - case constant.ChannelTypeSunoAPI: - endpointTypes = []constant.EndpointType{constant.EndpointTypeSuno} - case constant.ChannelTypeKling: - endpointTypes = []constant.EndpointType{constant.EndpointTypeKling} - case constant.ChannelTypeJimeng: - endpointTypes = []constant.EndpointType{constant.EndpointTypeJimeng} + //case constant.ChannelTypeMidjourney, constant.ChannelTypeMidjourneyPlus: + // endpointTypes = []constant.EndpointType{constant.EndpointTypeMidjourney} + //case constant.ChannelTypeSunoAPI: + // endpointTypes = []constant.EndpointType{constant.EndpointTypeSuno} + //case constant.ChannelTypeKling: + // endpointTypes = []constant.EndpointType{constant.EndpointTypeKling} + //case constant.ChannelTypeJimeng: + // endpointTypes = []constant.EndpointType{constant.EndpointTypeJimeng} case constant.ChannelTypeAws: fallthrough case constant.ChannelTypeAnthropic: diff --git a/constant/endpoint_type.go b/constant/endpoint_type.go index 323bf2d6..c9aac94a 100644 --- a/constant/endpoint_type.go +++ b/constant/endpoint_type.go @@ -8,8 +8,8 @@ const ( EndpointTypeAnthropic EndpointType = "anthropic" EndpointTypeGemini EndpointType = "gemini" EndpointTypeJinaRerank EndpointType = "jina-rerank" - EndpointTypeMidjourney EndpointType = "midjourney-proxy" - EndpointTypeSuno EndpointType = "suno-proxy" - EndpointTypeKling EndpointType = "kling" - EndpointTypeJimeng EndpointType = "jimeng" + //EndpointTypeMidjourney EndpointType = "midjourney-proxy" + //EndpointTypeSuno EndpointType = "suno-proxy" + //EndpointTypeKling EndpointType = "kling" + //EndpointTypeJimeng EndpointType = "jimeng" ) diff --git a/service/token_counter.go b/service/token_counter.go index 302d6c1a..eed5b5ca 100644 --- a/service/token_counter.go +++ b/service/token_counter.go @@ -172,9 +172,6 @@ func CountTokenChatRequest(info *relaycommon.RelayInfo, request dto.GeneralOpenA } } toolTokens := CountTokenInput(countStr, request.Model) - if err != nil { - return 0, err - } tkm += 8 tkm += toolTokens } @@ -195,9 +192,6 @@ func CountTokenClaudeRequest(request dto.ClaudeRequest, model string) (int, erro // Count tokens in system message if request.System != "" { systemTokens := CountTokenInput(request.System, model) - if err != nil { - return 0, err - } tkm += systemTokens }