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:
Laisky.Cai
2024-03-01 02:14:32 +00:00
parent c849292621
commit ba827b95e3
6 changed files with 13 additions and 155 deletions

View File

@@ -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)