@@ -318,4 +318,132 @@ interactions:
318
318
status :
319
319
code : 200
320
320
message : OK
321
+ - request :
322
+ body : ' {"messages": [{"content": "You are a temperature bot. Today is 2024-06-09.",
323
+ "role": "system"}, {"content": "Hello, what is the temperature in SF right now?",
324
+ "role": "user"}], "model": "gpt-4o", "n": 1, "stream": false, "temperature":
325
+ 1.0, "tools": [{"type": "function", "function": {"name": "fetch_current_temperature",
326
+ "description": "Fetch the current temperature data for a location", "parameters":
327
+ {"type": "object", "properties": {"location": {"type": "string"}}, "required":
328
+ ["location"]}}}, {"type": "function", "function": {"name": "fetch_forecast_temperature",
329
+ "description": "Fetch the forecast temperature data for a location", "parameters":
330
+ {"type": "object", "properties": {"location": {"type": "string"}, "dt_str":
331
+ {"description": "Date in the format '' YYYY-MM-DD'' ", "type": "string"}}, "required":
332
+ ["location", "dt_str"]}}}]}'
333
+ headers :
334
+ accept :
335
+ - application/json
336
+ accept-encoding :
337
+ - gzip, deflate
338
+ authorization :
339
+ - DUMMY
340
+ connection :
341
+ - keep-alive
342
+ content-length :
343
+ - ' 841'
344
+ content-type :
345
+ - application/json
346
+ host :
347
+ - api.openai.com
348
+ user-agent :
349
+ - OpenAI/Python
350
+ x-stainless-retry-count :
351
+ - ' 0'
352
+ method : POST
353
+ uri : https://api.openai.com/v1/chat/completions
354
+ response :
355
+ content : " {\n \" id\" : \" chatcmpl-ABSmb01E3YyChwmBIzMISWjmvUG0K\" ,\n \" object\" :
356
+ \" chat.completion\" ,\n \" created\" : 1727295613,\n \" model\" : \" gpt-4o-2024-05-13\" ,\n
357
+ \ \" choices\" : [\n {\n \" index\" : 0,\n \" message\" : {\n \" role\" :
358
+ \" assistant\" ,\n \" content\" : null,\n \" tool_calls\" : [\n {\n
359
+ \ \" id\" : \" call_jKppWP5dHGqhiP5rPzoe0muL\" ,\n \" type\" :
360
+ \" function\" ,\n \" function\" : {\n \" name\" : \" fetch_current_temperature\" ,\n
361
+ \ \" arguments\" : \" {\\\" location\\\" :\\\" San Francisco, CA\\\" }\"\n
362
+ \ }\n }\n ],\n \" refusal\" : null\n },\n
363
+ \ \" logprobs\" : null,\n \" finish_reason\" : \" tool_calls\"\n }\n
364
+ \ ],\n \" usage\" : {\n \" prompt_tokens\" : 114,\n \" completion_tokens\" :
365
+ 18,\n \" total_tokens\" : 132,\n \" completion_tokens_details\" : {\n \" reasoning_tokens\" :
366
+ 0\n }\n },\n \" system_fingerprint\" : \" fp_52a7f40b0b\"\n }\n "
367
+ headers :
368
+ Connection :
369
+ - keep-alive
370
+ Content-Encoding :
371
+ - gzip
372
+ Content-Type :
373
+ - application/json
374
+ Date : Sun, 09 Jun 2024 23:39:08 GMT
375
+ Server : DUMMY
376
+ Transfer-Encoding :
377
+ - chunked
378
+ X-Content-Type-Options :
379
+ - nosniff
380
+ access-control-expose-headers :
381
+ - X-Request-ID
382
+ http_version : HTTP/1.1
383
+ status_code : 200
384
+ - request :
385
+ body : ' {"messages": [{"content": "You are a temperature bot. Today is 2024-06-09.",
386
+ "role": "system"}, {"content": "Hello, what is the temperature in SF right now?",
387
+ "role": "user"}, {"content": null, "role": "assistant", "tool_calls": [{"type":
388
+ "function", "id": "call_jKppWP5dHGqhiP5rPzoe0muL", "function": {"name": "fetch_current_temperature",
389
+ "arguments": "{\"location\": \"San Francisco, CA\"}"}}]}, {"content": "32 degrees
390
+ Celsius", "role": "tool", "tool_call_id": "call_jKppWP5dHGqhiP5rPzoe0muL"}],
391
+ "model": "gpt-4o", "n": 1, "stream": false, "temperature": 1.0, "tools": [{"type":
392
+ "function", "function": {"name": "fetch_current_temperature", "description":
393
+ "Fetch the current temperature data for a location", "parameters": {"type":
394
+ "object", "properties": {"location": {"type": "string"}}, "required": ["location"]}}},
395
+ {"type": "function", "function": {"name": "fetch_forecast_temperature", "description":
396
+ "Fetch the forecast temperature data for a location", "parameters": {"type":
397
+ "object", "properties": {"location": {"type": "string"}, "dt_str": {"description":
398
+ "Date in the format '' YYYY-MM-DD'' ", "type": "string"}}, "required": ["location",
399
+ "dt_str"]}}}]}'
400
+ headers :
401
+ accept :
402
+ - application/json
403
+ accept-encoding :
404
+ - gzip, deflate
405
+ authorization :
406
+ - DUMMY
407
+ connection :
408
+ - keep-alive
409
+ content-length :
410
+ - ' 1163'
411
+ content-type :
412
+ - application/json
413
+ cookie :
414
+ - DUMMY
415
+ host :
416
+ - api.openai.com
417
+ user-agent :
418
+ - OpenAI/Python
419
+ x-stainless-retry-count :
420
+ - ' 0'
421
+ method : POST
422
+ uri : https://api.openai.com/v1/chat/completions
423
+ response :
424
+ content : " {\n \" id\" : \" chatcmpl-ABSmcZD5uoGWzTDRVh09XXmoz3AqH\" ,\n \" object\" :
425
+ \" chat.completion\" ,\n \" created\" : 1727295614,\n \" model\" : \" gpt-4o-2024-05-13\" ,\n
426
+ \ \" choices\" : [\n {\n \" index\" : 0,\n \" message\" : {\n \" role\" :
427
+ \" assistant\" ,\n \" content\" : \" The current temperature in San Francisco,
428
+ CA is 32 degrees Celsius.\" ,\n \" refusal\" : null\n },\n \" logprobs\" :
429
+ null,\n \" finish_reason\" : \" stop\"\n }\n ],\n \" usage\" : {\n \" prompt_tokens\" :
430
+ 144,\n \" completion_tokens\" : 15,\n \" total_tokens\" : 159,\n \" completion_tokens_details\" :
431
+ {\n \" reasoning_tokens\" : 0\n }\n },\n \" system_fingerprint\" : \" fp_3537616b13\"\n }\n "
432
+ headers :
433
+ Connection :
434
+ - keep-alive
435
+ Content-Encoding :
436
+ - gzip
437
+ Content-Type :
438
+ - application/json
439
+ Date : Sun, 09 Jun 2024 23:39:08 GMT
440
+ Server : DUMMY
441
+ Transfer-Encoding :
442
+ - chunked
443
+ X-Content-Type-Options :
444
+ - nosniff
445
+ access-control-expose-headers :
446
+ - X-Request-ID
447
+ http_version : HTTP/1.1
448
+ status_code : 200
321
449
version : 1
0 commit comments