Remove hardcoded assistants version (#719)
This commit is contained in:
@@ -51,7 +51,7 @@ type ThreadDeleteResponse struct {
|
||||
// CreateThread creates a new thread.
|
||||
func (c *Client) CreateThread(ctx context.Context, request ThreadRequest) (response Thread, err error) {
|
||||
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(threadsSuffix), withBody(request),
|
||||
withBetaAssistantV1())
|
||||
withBetaAssistantVersion(c.config.AssistantVersion))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -64,7 +64,7 @@ func (c *Client) CreateThread(ctx context.Context, request ThreadRequest) (respo
|
||||
func (c *Client) RetrieveThread(ctx context.Context, threadID string) (response Thread, err error) {
|
||||
urlSuffix := threadsSuffix + "/" + threadID
|
||||
req, err := c.newRequest(ctx, http.MethodGet, c.fullURL(urlSuffix),
|
||||
withBetaAssistantV1())
|
||||
withBetaAssistantVersion(c.config.AssistantVersion))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -81,7 +81,7 @@ func (c *Client) ModifyThread(
|
||||
) (response Thread, err error) {
|
||||
urlSuffix := threadsSuffix + "/" + threadID
|
||||
req, err := c.newRequest(ctx, http.MethodPost, c.fullURL(urlSuffix), withBody(request),
|
||||
withBetaAssistantV1())
|
||||
withBetaAssistantVersion(c.config.AssistantVersion))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
@@ -97,7 +97,7 @@ func (c *Client) DeleteThread(
|
||||
) (response ThreadDeleteResponse, err error) {
|
||||
urlSuffix := threadsSuffix + "/" + threadID
|
||||
req, err := c.newRequest(ctx, http.MethodDelete, c.fullURL(urlSuffix),
|
||||
withBetaAssistantV1())
|
||||
withBetaAssistantVersion(c.config.AssistantVersion))
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user