Fix Azure embeddings model detection by passing string to fullURL (#637)

This commit is contained in:
Grey Baker
2024-01-16 04:32:48 -05:00
committed by GitHub
parent 09f6920ad0
commit 4ce03a919a
2 changed files with 27 additions and 1 deletions

View File

@@ -228,7 +228,7 @@ func (c *Client) CreateEmbeddings(
conv EmbeddingRequestConverter,
) (res EmbeddingResponse, err error) {
baseReq := conv.Convert()
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL("/embeddings", baseReq.Model), withBody(baseReq))
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL("/embeddings", string(baseReq.Model)), withBody(baseReq))
if err != nil {
return
}