Remove hardcoded assistants version (#719)

This commit is contained in:
Danai Antoniou
2024-04-24 12:59:50 +01:00
committed by GitHub
parent c6a63ed19a
commit 8d15a377ec
6 changed files with 44 additions and 45 deletions

View File

@@ -89,9 +89,9 @@ func withContentType(contentType string) requestOption {
}
}
func withBetaAssistantV1() requestOption {
func withBetaAssistantVersion(version string) requestOption {
return func(args *requestOptions) {
args.header.Set("OpenAI-Beta", "assistants=v1")
args.header.Set("OpenAI-Beta", fmt.Sprintf("assistants=%s", version))
}
}