@@ -10,7 +10,7 @@ const openai = new OpenAI({
1010
1111describe ( 'resource messages' , ( ) => {
1212 test ( 'create: only required params' , async ( ) => {
13- const responsePromise = openai . beta . threads . messages . create ( 'string ' , {
13+ const responsePromise = openai . beta . threads . messages . create ( 'thread_id ' , {
1414 content : 'string' ,
1515 role : 'user' ,
1616 } ) ;
@@ -24,20 +24,20 @@ describe('resource messages', () => {
2424 } ) ;
2525
2626 test ( 'create: required and optional params' , async ( ) => {
27- const response = await openai . beta . threads . messages . create ( 'string ' , {
27+ const response = await openai . beta . threads . messages . create ( 'thread_id ' , {
2828 content : 'string' ,
2929 role : 'user' ,
3030 attachments : [
3131 {
32- file_id : 'string ' ,
32+ file_id : 'file_id ' ,
3333 tools : [ { type : 'code_interpreter' } , { type : 'code_interpreter' } , { type : 'code_interpreter' } ] ,
3434 } ,
3535 {
36- file_id : 'string ' ,
36+ file_id : 'file_id ' ,
3737 tools : [ { type : 'code_interpreter' } , { type : 'code_interpreter' } , { type : 'code_interpreter' } ] ,
3838 } ,
3939 {
40- file_id : 'string ' ,
40+ file_id : 'file_id ' ,
4141 tools : [ { type : 'code_interpreter' } , { type : 'code_interpreter' } , { type : 'code_interpreter' } ] ,
4242 } ,
4343 ] ,
@@ -46,7 +46,7 @@ describe('resource messages', () => {
4646 } ) ;
4747
4848 test ( 'retrieve' , async ( ) => {
49- const responsePromise = openai . beta . threads . messages . retrieve ( 'string ' , 'string ' ) ;
49+ const responsePromise = openai . beta . threads . messages . retrieve ( 'thread_id ' , 'message_id ' ) ;
5050 const rawResponse = await responsePromise . asResponse ( ) ;
5151 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
5252 const response = await responsePromise ;
@@ -59,12 +59,12 @@ describe('resource messages', () => {
5959 test ( 'retrieve: request options instead of params are passed correctly' , async ( ) => {
6060 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
6161 await expect (
62- openai . beta . threads . messages . retrieve ( 'string ' , 'string ' , { path : '/_stainless_unknown_path' } ) ,
62+ openai . beta . threads . messages . retrieve ( 'thread_id ' , 'message_id ' , { path : '/_stainless_unknown_path' } ) ,
6363 ) . rejects . toThrow ( OpenAI . NotFoundError ) ;
6464 } ) ;
6565
6666 test ( 'update' , async ( ) => {
67- const responsePromise = openai . beta . threads . messages . update ( 'string ' , 'string ' , { } ) ;
67+ const responsePromise = openai . beta . threads . messages . update ( 'thread_id ' , 'message_id ' , { } ) ;
6868 const rawResponse = await responsePromise . asResponse ( ) ;
6969 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
7070 const response = await responsePromise ;
@@ -75,7 +75,7 @@ describe('resource messages', () => {
7575 } ) ;
7676
7777 test ( 'list' , async ( ) => {
78- const responsePromise = openai . beta . threads . messages . list ( 'string ' ) ;
78+ const responsePromise = openai . beta . threads . messages . list ( 'thread_id ' ) ;
7979 const rawResponse = await responsePromise . asResponse ( ) ;
8080 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
8181 const response = await responsePromise ;
@@ -88,23 +88,23 @@ describe('resource messages', () => {
8888 test ( 'list: request options instead of params are passed correctly' , async ( ) => {
8989 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
9090 await expect (
91- openai . beta . threads . messages . list ( 'string ' , { path : '/_stainless_unknown_path' } ) ,
91+ openai . beta . threads . messages . list ( 'thread_id ' , { path : '/_stainless_unknown_path' } ) ,
9292 ) . rejects . toThrow ( OpenAI . NotFoundError ) ;
9393 } ) ;
9494
9595 test ( 'list: request options and params are passed correctly' , async ( ) => {
9696 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
9797 await expect (
9898 openai . beta . threads . messages . list (
99- 'string ' ,
100- { after : 'string ' , before : 'string ' , limit : 0 , order : 'asc' , run_id : 'string ' } ,
99+ 'thread_id ' ,
100+ { after : 'after ' , before : 'before ' , limit : 0 , order : 'asc' , run_id : 'run_id ' } ,
101101 { path : '/_stainless_unknown_path' } ,
102102 ) ,
103103 ) . rejects . toThrow ( OpenAI . NotFoundError ) ;
104104 } ) ;
105105
106106 test ( 'del' , async ( ) => {
107- const responsePromise = openai . beta . threads . messages . del ( 'string ' , 'string ' ) ;
107+ const responsePromise = openai . beta . threads . messages . del ( 'thread_id ' , 'message_id ' ) ;
108108 const rawResponse = await responsePromise . asResponse ( ) ;
109109 expect ( rawResponse ) . toBeInstanceOf ( Response ) ;
110110 const response = await responsePromise ;
@@ -117,7 +117,7 @@ describe('resource messages', () => {
117117 test ( 'del: request options instead of params are passed correctly' , async ( ) => {
118118 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
119119 await expect (
120- openai . beta . threads . messages . del ( 'string ' , 'string ' , { path : '/_stainless_unknown_path' } ) ,
120+ openai . beta . threads . messages . del ( 'thread_id ' , 'message_id ' , { path : '/_stainless_unknown_path' } ) ,
121121 ) . rejects . toThrow ( OpenAI . NotFoundError ) ;
122122 } ) ;
123123} ) ;
0 commit comments