mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-11-08 17:53:41 +08:00
revert: Rework text model logic and update dependencies
- Rewrite model name for relay text - Simplify logic and move logging statements - Remove a check that filtered out models by model-mapping - Remove abilities for the model mapping - Lower numeric tolerance for test files
This commit is contained in:
@@ -29,16 +29,9 @@ func RelayTextHelper(c *gin.Context) *model.ErrorWithStatusCode {
|
||||
meta.IsStream = textRequest.Stream
|
||||
|
||||
// map model name
|
||||
var (
|
||||
originRequestModel = textRequest.Model
|
||||
isModelMapped bool
|
||||
)
|
||||
var isModelMapped bool
|
||||
meta.OriginModelName = textRequest.Model
|
||||
textRequest.Model, isModelMapped = util.GetMappedModelName(textRequest.Model, meta.ModelMapping)
|
||||
if isModelMapped {
|
||||
logger.Info(c.Request.Context(), fmt.Sprintf("rewrite model name from %s to %s", originRequestModel, textRequest.Model))
|
||||
}
|
||||
|
||||
meta.ActualModelName = textRequest.Model
|
||||
// get model ratio & group ratio
|
||||
modelRatio := common.GetModelRatio(textRequest.Model)
|
||||
|
||||
Reference in New Issue
Block a user