Fix Refactor assistant api (#545)

* fix: refactor assistant API

* fix

* trigger build

* fix: use AssistantDeleteResponse
This commit is contained in:
Simone Vellei
2023-11-08 10:20:20 +01:00
committed by GitHub
parent a0159ad2b0
commit a2d2bf6851
2 changed files with 59 additions and 39 deletions

View File

@@ -83,6 +83,12 @@ func withContentType(contentType string) requestOption {
}
}
func withBetaAssistantV1() requestOption {
return func(args *requestOptions) {
args.header.Set("OpenAI-Beta", "assistants=v1")
}
}
func (c *Client) newRequest(ctx context.Context, method, url string, setters ...requestOption) (*http.Request, error) {
// Default Options
args := &requestOptions{