fix: fullURL endpoint generation (#817)
This commit is contained in:
@@ -3,6 +3,7 @@ package openai
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
var (
|
||||
@@ -33,7 +34,12 @@ func (c *Client) CreateCompletionStream(
|
||||
}
|
||||
|
||||
request.Stream = true
|
||||
req, err := c.newRequest(ctx, "POST", c.fullURL(urlSuffix, request.Model), withBody(request))
|
||||
req, err := c.newRequest(
|
||||
ctx,
|
||||
http.MethodPost,
|
||||
c.fullURL(urlSuffix, withModel(request.Model)),
|
||||
withBody(request),
|
||||
)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user