@@ -27,9 +27,12 @@ import (
2727// Note, unlike clients, this service does not read variables from the environment
2828// automatically. You should not instantiate this service directly, and instead use
2929// the [NewBetaThreadRunService] method instead.
30+ //
31+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
3032type BetaThreadRunService struct {
3133 Options []option.RequestOption
32- Steps BetaThreadRunStepService
34+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
35+ Steps BetaThreadRunStepService
3336}
3437
3538// NewBetaThreadRunService generates a new service that applies the given options
@@ -43,6 +46,8 @@ func NewBetaThreadRunService(opts ...option.RequestOption) (r BetaThreadRunServi
4346}
4447
4548// Create a run.
49+ //
50+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
4651func (r * BetaThreadRunService ) New (ctx context.Context , threadID string , params BetaThreadRunNewParams , opts ... option.RequestOption ) (res * Run , err error ) {
4752 opts = append (r .Options [:], opts ... )
4853 opts = append ([]option.RequestOption {option .WithHeader ("OpenAI-Beta" , "assistants=v2" )}, opts ... )
@@ -56,6 +61,8 @@ func (r *BetaThreadRunService) New(ctx context.Context, threadID string, params
5661}
5762
5863// Create a run.
64+ //
65+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
5966func (r * BetaThreadRunService ) NewStreaming (ctx context.Context , threadID string , params BetaThreadRunNewParams , opts ... option.RequestOption ) (stream * ssestream.Stream [AssistantStreamEventUnion ]) {
6067 var (
6168 raw * http.Response
@@ -73,6 +80,8 @@ func (r *BetaThreadRunService) NewStreaming(ctx context.Context, threadID string
7380}
7481
7582// Retrieves a run.
83+ //
84+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
7685func (r * BetaThreadRunService ) Get (ctx context.Context , threadID string , runID string , opts ... option.RequestOption ) (res * Run , err error ) {
7786 opts = append (r .Options [:], opts ... )
7887 opts = append ([]option.RequestOption {option .WithHeader ("OpenAI-Beta" , "assistants=v2" )}, opts ... )
@@ -90,6 +99,8 @@ func (r *BetaThreadRunService) Get(ctx context.Context, threadID string, runID s
9099}
91100
92101// Modifies a run.
102+ //
103+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
93104func (r * BetaThreadRunService ) Update (ctx context.Context , threadID string , runID string , body BetaThreadRunUpdateParams , opts ... option.RequestOption ) (res * Run , err error ) {
94105 opts = append (r .Options [:], opts ... )
95106 opts = append ([]option.RequestOption {option .WithHeader ("OpenAI-Beta" , "assistants=v2" )}, opts ... )
@@ -107,6 +118,8 @@ func (r *BetaThreadRunService) Update(ctx context.Context, threadID string, runI
107118}
108119
109120// Returns a list of runs belonging to a thread.
121+ //
122+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
110123func (r * BetaThreadRunService ) List (ctx context.Context , threadID string , query BetaThreadRunListParams , opts ... option.RequestOption ) (res * pagination.CursorPage [Run ], err error ) {
111124 var raw * http.Response
112125 opts = append (r .Options [:], opts ... )
@@ -129,11 +142,15 @@ func (r *BetaThreadRunService) List(ctx context.Context, threadID string, query
129142}
130143
131144// Returns a list of runs belonging to a thread.
145+ //
146+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
132147func (r * BetaThreadRunService ) ListAutoPaging (ctx context.Context , threadID string , query BetaThreadRunListParams , opts ... option.RequestOption ) * pagination.CursorPageAutoPager [Run ] {
133148 return pagination .NewCursorPageAutoPager (r .List (ctx , threadID , query , opts ... ))
134149}
135150
136151// Cancels a run that is `in_progress`.
152+ //
153+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
137154func (r * BetaThreadRunService ) Cancel (ctx context.Context , threadID string , runID string , opts ... option.RequestOption ) (res * Run , err error ) {
138155 opts = append (r .Options [:], opts ... )
139156 opts = append ([]option.RequestOption {option .WithHeader ("OpenAI-Beta" , "assistants=v2" )}, opts ... )
@@ -154,6 +171,8 @@ func (r *BetaThreadRunService) Cancel(ctx context.Context, threadID string, runI
154171// `submit_tool_outputs`, this endpoint can be used to submit the outputs from the
155172// tool calls once they're all completed. All outputs must be submitted in a single
156173// request.
174+ //
175+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
157176func (r * BetaThreadRunService ) SubmitToolOutputs (ctx context.Context , threadID string , runID string , body BetaThreadRunSubmitToolOutputsParams , opts ... option.RequestOption ) (res * Run , err error ) {
158177 opts = append (r .Options [:], opts ... )
159178 opts = append ([]option.RequestOption {option .WithHeader ("OpenAI-Beta" , "assistants=v2" )}, opts ... )
@@ -174,6 +193,8 @@ func (r *BetaThreadRunService) SubmitToolOutputs(ctx context.Context, threadID s
174193// `submit_tool_outputs`, this endpoint can be used to submit the outputs from the
175194// tool calls once they're all completed. All outputs must be submitted in a single
176195// request.
196+ //
197+ // Deprecated: The Assistants API is deprecated in favor of the Responses API
177198func (r * BetaThreadRunService ) SubmitToolOutputsStreaming (ctx context.Context , threadID string , runID string , body BetaThreadRunSubmitToolOutputsParams , opts ... option.RequestOption ) (stream * ssestream.Stream [AssistantStreamEventUnion ]) {
178199 var (
179200 raw * http.Response
0 commit comments