refactor: replace DeepCopy with Copy for request handling consistency

This commit is contained in:
CaIon
2025-08-28 14:57:47 +08:00
parent b0c703935f
commit 872f7a9648
12 changed files with 58 additions and 50 deletions

View File

@@ -23,7 +23,7 @@ func EmbeddingHelper(c *gin.Context, info *relaycommon.RelayInfo) (newAPIError *
return types.NewErrorWithStatusCode(fmt.Errorf("invalid request type, expected *dto.EmbeddingRequest, got %T", info.Request), types.ErrorCodeInvalidRequest, http.StatusBadRequest, types.ErrOptionWithSkipRetry())
}
request, err := common.DeepCopy(embeddingReq)
request, err := common.Copy(embeddingReq, false)
if err != nil {
return types.NewError(fmt.Errorf("failed to copy request to EmbeddingRequest: %w", err), types.ErrorCodeInvalidRequest, types.ErrOptionWithSkipRetry())
}