From 8c5182bab5fe498216a4b17e4c4a83192373783d Mon Sep 17 00:00:00 2001 From: Richard Weerasinghe Date: Fri, 10 May 2024 13:00:58 +1200 Subject: [PATCH] fixup json tags --- openai/assistant.go | 4 ++-- openai/endpoint.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 }