fix zhipu embedding error when input is array but not string

This commit is contained in:
蔡新疆 2024-04-13 17:12:41 +08:00
parent a10232f43a
commit 5bdb30a983

View File

@ -132,7 +132,7 @@ func (a *Adaptor) DoResponse(c *gin.Context, resp *http.Response, meta *meta.Met
func ConvertEmbeddingRequest(request model.GeneralOpenAIRequest) *EmbeddingRequest {
return &EmbeddingRequest{
Model: "embedding-2",
Input: request.Input.(string),
Input: strings.Join(request.ParseInput(), " "),
}
}