when:
  path: /chat/completions
  method: POST
  query_param: []
  header:
  - name: accept
    value: '*/*'
  - name: content-type
    value: application/json
  body: '{"messages":[{"content":[{"text":"You are a helpful weather assistant. Respond with realistic weather data.","type":"text"}],"role":"system"},{"content":"What''s the weather forecast for New York City today?","role":"user"}],"model":"gpt-4o","response_format":{"json_schema":{"name":"WeatherForecast","schema":{"$defs":{"Conditions":{"additionalProperties":false,"properties":{"description":{"type":"string"},"humidity_pct":{"format":"uint8","maximum":255,"minimum":0,"type":"integer"},"temperature_f":{"format":"double","type":"number"}},"required":["temperature_f","humidity_pct","description"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"city":{"type":"string"},"current":{"$ref":"#/$defs/Conditions"}},"required":["city","current"],"title":"WeatherForecast","type":"object"},"strict":true},"type":"json_schema"}}'
then:
  status: 200
  header:
  - name: content-type
    value: application/json
  body: '{"choices":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"finish_reason":"stop","index":0,"message":{"content":"{\"city\":\"New York City\",\"current\":{\"description\":\"Mostly sunny\",\"humidity_pct\":60,\"temperature_f\":75.0}}","padding":"a","role":"assistant"}}],"copilot_usage":{"token_details":[{"batch_size":1000000,"cost_per_batch":0,"token_count":112,"token_type":"input"},{"batch_size":1000000,"cost_per_batch":0,"token_count":0,"token_type":"cache_read"},{"batch_size":1000000,"cost_per_batch":0,"token_count":0,"token_type":"cache_write"},{"batch_size":1000000,"cost_per_batch":0,"token_count":27,"token_type":"output"}],"total_nano_aiu":0},"id":"chatcmpl-REDACTED_1","model":"gpt-4o-2024-11-20","prompt_filter_results":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"prompt_index":0}],"service_tier":"default","system_fingerprint":"fp_REDACTED_1","usage":{"completion_tokens":27,"completion_tokens_details":{"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens":112,"prompt_tokens_details":{"cached_tokens":0},"reasoning_tokens":0,"total_tokens":139}}'
---
when:
  path: /chat/completions
  method: POST
  query_param: []
  header:
  - name: accept
    value: '*/*'
  - name: content-type
    value: application/json
  body: '{"messages":[{"content":[{"text":"You are a helpful weather assistant. Respond with realistic weather data.","type":"text"}],"role":"system"},{"content":"What''s the weather forecast for Los Angeles?","role":"user"}],"model":"gpt-4o","response_format":{"json_schema":{"name":"WeatherForecast","schema":{"$defs":{"Conditions":{"additionalProperties":false,"properties":{"description":{"type":"string"},"humidity_pct":{"format":"uint8","maximum":255,"minimum":0,"type":"integer"},"temperature_f":{"format":"double","type":"number"}},"required":["temperature_f","humidity_pct","description"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"city":{"type":"string"},"current":{"$ref":"#/$defs/Conditions"}},"required":["city","current"],"title":"WeatherForecast","type":"object"},"strict":true},"type":"json_schema"}}'
then:
  status: 200
  header:
  - name: content-type
    value: application/json
  body: '{"choices":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"finish_reason":"stop","index":0,"message":{"content":"{\"city\":\"Los Angeles\",\"current\":{\"description\":\"Sunny\",\"humidity_pct\":40,\"temperature_f\":75.0}}","padding":"abcde","role":"assistant"}}],"copilot_usage":{"token_details":[{"batch_size":1000000,"cost_per_batch":0,"token_count":110,"token_type":"input"},{"batch_size":1000000,"cost_per_batch":0,"token_count":0,"token_type":"cache_read"},{"batch_size":1000000,"cost_per_batch":0,"token_count":0,"token_type":"cache_write"},{"batch_size":1000000,"cost_per_batch":0,"token_count":25,"token_type":"output"}],"total_nano_aiu":0},"id":"chatcmpl-REDACTED_2","model":"gpt-4o-2024-11-20","prompt_filter_results":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"prompt_index":0}],"service_tier":"default","system_fingerprint":"fp_REDACTED_1","usage":{"completion_tokens":25,"completion_tokens_details":{"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens":110,"prompt_tokens_details":{"cached_tokens":0},"reasoning_tokens":0,"total_tokens":135}}'
---
when:
  path: /chat/completions
  method: POST
  query_param: []
  header:
  - name: accept
    value: '*/*'
  - name: content-type
    value: application/json
  body: '{"messages":[{"content":[{"text":"You are a helpful weather assistant. Respond with realistic weather data.","type":"text"}],"role":"system"},{"content":"What''s the weather forecast for Chicago?","role":"user"}],"model":"gpt-4o","response_format":{"json_schema":{"name":"WeatherForecast","schema":{"$defs":{"Conditions":{"additionalProperties":false,"properties":{"description":{"type":"string"},"humidity_pct":{"format":"uint8","maximum":255,"minimum":0,"type":"integer"},"temperature_f":{"format":"double","type":"number"}},"required":["temperature_f","humidity_pct","description"],"type":"object"}},"$schema":"https://json-schema.org/draft/2020-12/schema","additionalProperties":false,"properties":{"city":{"type":"string"},"current":{"$ref":"#/$defs/Conditions"}},"required":["city","current"],"title":"WeatherForecast","type":"object"},"strict":true},"type":"json_schema"}}'
then:
  status: 200
  header:
  - name: content-type
    value: application/json
  body: '{"choices":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"finish_reason":"stop","index":0,"message":{"content":"{\"city\":\"Chicago\",\"current\":{\"description\":\"Partly cloudy\",\"humidity_pct\":65,\"temperature_f\":55.0}}","padding":"abcdefghijk","role":"assistant"}}],"copilot_usage":{"token_details":[{"batch_size":1000000,"cost_per_batch":0,"token_count":109,"token_type":"input"},{"batch_size":1000000,"cost_per_batch":0,"token_count":0,"token_type":"cache_read"},{"batch_size":1000000,"cost_per_batch":0,"token_count":0,"token_type":"cache_write"},{"batch_size":1000000,"cost_per_batch":0,"token_count":26,"token_type":"output"}],"total_nano_aiu":0},"id":"chatcmpl-REDACTED_3","model":"gpt-4o-2024-11-20","prompt_filter_results":[{"content_filter_results":{"hate":{"filtered":false,"severity":"safe"},"self_harm":{"filtered":false,"severity":"safe"},"sexual":{"filtered":false,"severity":"safe"},"violence":{"filtered":false,"severity":"safe"}},"prompt_index":0}],"service_tier":"default","system_fingerprint":"fp_REDACTED_1","usage":{"completion_tokens":26,"completion_tokens_details":{"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens":109,"prompt_tokens_details":{"cached_tokens":0},"reasoning_tokens":0,"total_tokens":135}}'
