diff --git a/openai/assistant.go b/openai/assistant.go index d664a1a..651e9c1 100644 --- a/openai/assistant.go +++ b/openai/assistant.go @@ -103,10 +103,10 @@ type AssistantToolResources struct { } `json:"code_interpreter,omitempty"` FileSearch *struct { VectorStoreIDs []string `json:"vector_store_ids"` - VectorStore *struct { + VectorStores *struct { FileIDs []string `json:"file_ids"` MetaData map[string]string `json:"metadata,omitempty"` - } `json:"vector_store,omitempty"` + } `json:"vector_stores,omitempty"` } `json:"file_search,omitempty"` } diff --git a/openai/endpoint.go b/openai/endpoint.go index 31dd76a..e5cf5f3 100644 --- a/openai/endpoint.go +++ b/openai/endpoint.go @@ -61,6 +61,6 @@ func (e *endpoint) newRequest(method string, u *url.URL, body interface{}) (*htt func (e *betaEndpoint) newRequest(method string, u *url.URL, body interface{}) (*http.Request, error) { req, err := e.Client.newRequest(method, u, body) - req.Header.Set("OpenAI-Beta", "assistants=v1") + req.Header.Set("OpenAI-Beta", "assistants=v2") return req, err }