@@ -24,12 +24,24 @@ describe('resource completions', () => {
2424
2525 test ( 'create: required and optional params' , async ( ) => {
2626 const response = await client . chat . completions . create ( {
27- messages : [ { content : 'string' , role : 'developer' , name : 'name' } ] ,
27+ messages : [
28+ {
29+ content : 'string' ,
30+ role : 'developer' ,
31+ name : 'name' ,
32+ } ,
33+ ] ,
2834 model : 'gpt-4o' ,
2935 audio : { format : 'wav' , voice : 'ash' } ,
3036 frequency_penalty : - 2 ,
3137 function_call : 'none' ,
32- functions : [ { name : 'name' , description : 'description' , parameters : { foo : 'bar' } } ] ,
38+ functions : [
39+ {
40+ name : 'name' ,
41+ description : 'description' ,
42+ parameters : { foo : 'bar' } ,
43+ } ,
44+ ] ,
3345 logit_bias : { foo : 0 } ,
3446 logprobs : true ,
3547 max_completion_tokens : 0 ,
@@ -55,7 +67,12 @@ describe('resource completions', () => {
5567 tool_choice : 'none' ,
5668 tools : [
5769 {
58- function : { name : 'name' , description : 'description' , parameters : { foo : 'bar' } , strict : true } ,
70+ function : {
71+ name : 'name' ,
72+ description : 'description' ,
73+ parameters : { foo : 'bar' } ,
74+ strict : true ,
75+ } ,
5976 type : 'function' ,
6077 } ,
6178 ] ,
@@ -66,7 +83,12 @@ describe('resource completions', () => {
6683 web_search_options : {
6784 search_context_size : 'low' ,
6885 user_location : {
69- approximate : { city : 'city' , country : 'country' , region : 'region' , timezone : 'timezone' } ,
86+ approximate : {
87+ city : 'city' ,
88+ country : 'country' ,
89+ region : 'region' ,
90+ timezone : 'timezone' ,
91+ } ,
7092 type : 'approximate' ,
7193 } ,
7294 } ,
@@ -114,7 +136,13 @@ describe('resource completions', () => {
114136 // ensure the request options are being passed correctly by passing an invalid HTTP method in order to cause an error
115137 await expect (
116138 client . chat . completions . list (
117- { after : 'after' , limit : 0 , metadata : { foo : 'string' } , model : 'model' , order : 'asc' } ,
139+ {
140+ after : 'after' ,
141+ limit : 0 ,
142+ metadata : { foo : 'string' } ,
143+ model : 'model' ,
144+ order : 'asc' ,
145+ } ,
118146 { path : '/_stainless_unknown_path' } ,
119147 ) ,
120148 ) . rejects . toThrow ( OpenAI . NotFoundError ) ;
0 commit comments