mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-09-18 09:36:37 +08:00
fix: Update context key for model name in AWS adaptor
- Updated context key for model name in `Handler` and `StreamHandler` functions of `main.go` for consistency and potential future usage - Functionality remains unchanged in this commit
This commit is contained in:
parent
e93e489ea9
commit
710a45565d
@ -81,7 +81,7 @@ func Handler(c *gin.Context, resp *http.Response, promptTokens int, modelName st
|
||||
return wrapErr(errors.Wrap(err, "newAwsClient")), nil
|
||||
}
|
||||
|
||||
awsModelId, err := awsModelID(c.GetString(common.CtxKeyOriginModel))
|
||||
awsModelId, err := awsModelID(c.GetString(common.CtxKeyRequestModel))
|
||||
if err != nil {
|
||||
return wrapErr(errors.Wrap(err, "awsModelID")), nil
|
||||
}
|
||||
@ -148,7 +148,7 @@ func StreamHandler(c *gin.Context, resp *http.Response) (*relaymodel.ErrorWithSt
|
||||
return wrapErr(errors.Wrap(err, "newAwsClient")), nil
|
||||
}
|
||||
|
||||
awsModelId, err := awsModelID(c.GetString(common.CtxKeyOriginModel))
|
||||
awsModelId, err := awsModelID(c.GetString(common.CtxKeyRequestModel))
|
||||
if err != nil {
|
||||
return wrapErr(errors.Wrap(err, "awsModelID")), nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user