File tree Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Expand file tree Collapse file tree 1 file changed +24
-3
lines changed Original file line number Diff line number Diff line change @@ -307,12 +307,33 @@ export async function promptWithToolsTest() {
307307 function : {
308308 name : "" ,
309309 description : "" ,
310- parameters : {
311-
312- } ,
310+ parameters : { } ,
313311 strict : true ,
314312 }
315313 }
316314 ]
317315 } )
316+ }
317+
318+ export async function promptWithMessageAndMessages ( ) {
319+ await prompt ( "What about Spain?" , {
320+ model : "gpt-4" ,
321+ token : 'secret' ,
322+ messages : [
323+ { role : "user" , content : "What is the capital of France?" } ,
324+ { role : "assistant" , content : "The capital of France is Paris." } ,
325+ ] ,
326+ } ) ;
327+ }
328+
329+ export async function promptWithoutMessageButMessages ( ) {
330+ await prompt ( {
331+ model : "gpt-4" ,
332+ token : 'secret' ,
333+ messages : [
334+ { role : "user" , content : "What is the capital of France?" } ,
335+ { role : "assistant" , content : "The capital of France is Paris." } ,
336+ { role : "user" , content : "What about Spain?" } ,
337+ ] ,
338+ } ) ;
318339}
You can’t perform that action at this time.
0 commit comments