1// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
3package openai
4
5import (
6 "github.com/openai/openai-go/option"
7)
8
9// BetaService contains methods and other services that help with interacting with
10// the openai API.
11//
12// Note, unlike clients, this service does not read variables from the environment
13// automatically. You should not instantiate this service directly, and instead use
14// the [NewBetaService] method instead.
15type BetaService struct {
16 Options []option.RequestOption
17 Assistants BetaAssistantService
18 // Deprecated: The Assistants API is deprecated in favor of the Responses API
19 Threads BetaThreadService
20}
21
22// NewBetaService generates a new service that applies the given options to each
23// request. These options are applied after the parent client's options (if there
24// is one), and before any request-specific options.
25func NewBetaService(opts ...option.RequestOption) (r BetaService) {
26 r = BetaService{}
27 r.Options = opts
28 r.Assistants = NewBetaAssistantService(opts...)
29 r.Threads = NewBetaThreadService(opts...)
30 return
31}