@@ -16,7 +16,7 @@ module OpenAI
16
16
messages : T ::Array [ T . any ( OpenAI ::Models ::Beta ::ThreadCreateParams ::Message , OpenAI ::Internal ::AnyHash ) ] ,
17
17
metadata : T . nilable ( T ::Hash [ Symbol , String ] ) ,
18
18
tool_resources : T . nilable ( T . any ( OpenAI ::Models ::Beta ::ThreadCreateParams ::ToolResources , OpenAI ::Internal ::AnyHash ) ) ,
19
- request_options : T . nilable ( T . any ( OpenAI ::RequestOptions , OpenAI :: Internal :: AnyHash ) )
19
+ request_options : OpenAI ::RequestOpts
20
20
)
21
21
. returns ( OpenAI ::Models ::Beta ::Thread )
22
22
end
@@ -39,13 +39,7 @@ module OpenAI
39
39
request_options : { }
40
40
) ; end
41
41
# Retrieves a thread.
42
- sig do
43
- params (
44
- thread_id : String ,
45
- request_options : T . nilable ( T . any ( OpenAI ::RequestOptions , OpenAI ::Internal ::AnyHash ) )
46
- )
47
- . returns ( OpenAI ::Models ::Beta ::Thread )
48
- end
42
+ sig { params ( thread_id : String , request_options : OpenAI ::RequestOpts ) . returns ( OpenAI ::Models ::Beta ::Thread ) }
49
43
def retrieve (
50
44
# The ID of the thread to retrieve.
51
45
thread_id ,
@@ -57,7 +51,7 @@ module OpenAI
57
51
thread_id : String ,
58
52
metadata : T . nilable ( T ::Hash [ Symbol , String ] ) ,
59
53
tool_resources : T . nilable ( T . any ( OpenAI ::Models ::Beta ::ThreadUpdateParams ::ToolResources , OpenAI ::Internal ::AnyHash ) ) ,
60
- request_options : T . nilable ( T . any ( OpenAI ::RequestOptions , OpenAI :: Internal :: AnyHash ) )
54
+ request_options : OpenAI ::RequestOpts
61
55
)
62
56
. returns ( OpenAI ::Models ::Beta ::Thread )
63
57
end
@@ -80,10 +74,7 @@ module OpenAI
80
74
) ; end
81
75
# Delete a thread.
82
76
sig do
83
- params (
84
- thread_id : String ,
85
- request_options : T . nilable ( T . any ( OpenAI ::RequestOptions , OpenAI ::Internal ::AnyHash ) )
86
- )
77
+ params ( thread_id : String , request_options : OpenAI ::RequestOpts )
87
78
. returns ( OpenAI ::Models ::Beta ::ThreadDeleted )
88
79
end
89
80
def delete (
@@ -137,7 +128,7 @@ module OpenAI
137
128
T . any ( OpenAI ::Models ::Beta ::ThreadCreateAndRunParams ::TruncationStrategy , OpenAI ::Internal ::AnyHash )
138
129
) ,
139
130
stream : T . noreturn ,
140
- request_options : T . nilable ( T . any ( OpenAI ::RequestOptions , OpenAI :: Internal :: AnyHash ) )
131
+ request_options : OpenAI ::RequestOpts
141
132
)
142
133
. returns ( OpenAI ::Models ::Beta ::Threads ::Run )
143
134
end
@@ -282,7 +273,7 @@ module OpenAI
282
273
T . any ( OpenAI ::Models ::Beta ::ThreadCreateAndRunParams ::TruncationStrategy , OpenAI ::Internal ::AnyHash )
283
274
) ,
284
275
stream : T . noreturn ,
285
- request_options : T . nilable ( T . any ( OpenAI ::RequestOptions , OpenAI :: Internal :: AnyHash ) )
276
+ request_options : OpenAI ::RequestOpts
286
277
)
287
278
. returns (
288
279
OpenAI ::Internal ::Stream [
0 commit comments