@@ -29,94 +29,7 @@ describe('resource runs', () => {
29
29
{
30
30
content : 'string' ,
31
31
role : 'user' ,
32
- attachments : [
33
- {
34
- file_id : 'file_id' ,
35
- tools : [
36
- { type : 'code_interpreter' } ,
37
- { type : 'code_interpreter' } ,
38
- { type : 'code_interpreter' } ,
39
- ] ,
40
- } ,
41
- {
42
- file_id : 'file_id' ,
43
- tools : [
44
- { type : 'code_interpreter' } ,
45
- { type : 'code_interpreter' } ,
46
- { type : 'code_interpreter' } ,
47
- ] ,
48
- } ,
49
- {
50
- file_id : 'file_id' ,
51
- tools : [
52
- { type : 'code_interpreter' } ,
53
- { type : 'code_interpreter' } ,
54
- { type : 'code_interpreter' } ,
55
- ] ,
56
- } ,
57
- ] ,
58
- metadata : { } ,
59
- } ,
60
- {
61
- content : 'string' ,
62
- role : 'user' ,
63
- attachments : [
64
- {
65
- file_id : 'file_id' ,
66
- tools : [
67
- { type : 'code_interpreter' } ,
68
- { type : 'code_interpreter' } ,
69
- { type : 'code_interpreter' } ,
70
- ] ,
71
- } ,
72
- {
73
- file_id : 'file_id' ,
74
- tools : [
75
- { type : 'code_interpreter' } ,
76
- { type : 'code_interpreter' } ,
77
- { type : 'code_interpreter' } ,
78
- ] ,
79
- } ,
80
- {
81
- file_id : 'file_id' ,
82
- tools : [
83
- { type : 'code_interpreter' } ,
84
- { type : 'code_interpreter' } ,
85
- { type : 'code_interpreter' } ,
86
- ] ,
87
- } ,
88
- ] ,
89
- metadata : { } ,
90
- } ,
91
- {
92
- content : 'string' ,
93
- role : 'user' ,
94
- attachments : [
95
- {
96
- file_id : 'file_id' ,
97
- tools : [
98
- { type : 'code_interpreter' } ,
99
- { type : 'code_interpreter' } ,
100
- { type : 'code_interpreter' } ,
101
- ] ,
102
- } ,
103
- {
104
- file_id : 'file_id' ,
105
- tools : [
106
- { type : 'code_interpreter' } ,
107
- { type : 'code_interpreter' } ,
108
- { type : 'code_interpreter' } ,
109
- ] ,
110
- } ,
111
- {
112
- file_id : 'file_id' ,
113
- tools : [
114
- { type : 'code_interpreter' } ,
115
- { type : 'code_interpreter' } ,
116
- { type : 'code_interpreter' } ,
117
- ] ,
118
- } ,
119
- ] ,
32
+ attachments : [ { file_id : 'file_id' , tools : [ { type : 'code_interpreter' } ] } ] ,
120
33
metadata : { } ,
121
34
} ,
122
35
] ,
@@ -130,7 +43,7 @@ describe('resource runs', () => {
130
43
stream : false ,
131
44
temperature : 1 ,
132
45
tool_choice : 'none' ,
133
- tools : [ { type : 'code_interpreter' } , { type : 'code_interpreter' } , { type : 'code_interpreter' } ] ,
46
+ tools : [ { type : 'code_interpreter' } ] ,
134
47
top_p : 1 ,
135
48
truncation_strategy : { type : 'auto' , last_messages : 1 } ,
136
49
} ) ;
@@ -214,7 +127,7 @@ describe('resource runs', () => {
214
127
215
128
test ( 'submitToolOutputs: only required params' , async ( ) => {
216
129
const responsePromise = client . beta . threads . runs . submitToolOutputs ( 'thread_id' , 'run_id' , {
217
- tool_outputs : [ { } , { } , { } ] ,
130
+ tool_outputs : [ { } ] ,
218
131
} ) ;
219
132
const rawResponse = await responsePromise . asResponse ( ) ;
220
133
expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
@@ -227,11 +140,7 @@ describe('resource runs', () => {
227
140
228
141
test ( 'submitToolOutputs: required and optional params' , async ( ) => {
229
142
const response = await client . beta . threads . runs . submitToolOutputs ( 'thread_id' , 'run_id' , {
230
- tool_outputs : [
231
- { output : 'output' , tool_call_id : 'tool_call_id' } ,
232
- { output : 'output' , tool_call_id : 'tool_call_id' } ,
233
- { output : 'output' , tool_call_id : 'tool_call_id' } ,
234
- ] ,
143
+ tool_outputs : [ { output : 'output' , tool_call_id : 'tool_call_id' } ] ,
235
144
stream : false ,
236
145
} ) ;
237
146
} ) ;
0 commit comments