Skip to content

Commit

Permalink
opentelemetry-instrumentation-openai-v2: scrub cookie from tests (#2993)
Browse files Browse the repository at this point in the history
  • Loading branch information
codefromthecrypt authored Nov 12, 2024
1 parent c28f7c9 commit 89a0b28
Show file tree
Hide file tree
Showing 12 changed files with 403 additions and 336 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ interactions:
- application/json
accept-encoding:
- gzip, deflate
authorization:
- Bearer test_openai_api_key
connection:
- keep-alive
content-length:
Expand Down Expand Up @@ -58,13 +60,13 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8e0ca7056be15f93-SIN
- 8e1225a16c283d93-SIN
Connection:
- keep-alive
Content-Type:
- application/json; charset=utf-8
Date:
- Mon, 11 Nov 2024 07:43:38 GMT
- Mon, 11 Nov 2024 23:43:52 GMT
Server:
- cloudflare
Set-Cookie: test_set_cookie
Expand All @@ -76,13 +78,13 @@ interactions:
- h3=":443"; ma=86400
content-length:
- '231'
openai-organization: test_organization
openai-organization: test_openai_org_id
strict-transport-security:
- max-age=31536000; includeSubDomains; preload
vary:
- Origin
x-request-id:
- req_75175efff56c313161c136c479e082ac
- req_c3e0f92d7b5426d1a4a17bb3d39953ea
status:
code: 404
message: Not Found
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ interactions:
- application/json
accept-encoding:
- gzip, deflate
authorization:
- Bearer test_openai_api_key
connection:
- keep-alive
content-length:
Expand All @@ -29,7 +31,7 @@ interactions:
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.26.0
- OpenAI/Python 1.54.3
x-stainless-arch:
- arm64
x-stainless-async:
Expand All @@ -39,7 +41,9 @@ interactions:
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.26.0
- 1.54.3
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
Expand All @@ -50,9 +54,9 @@ interactions:
body:
string: |-
{
"id": "chatcmpl-APfFNvBVQx43PNOIf1dWnEUT5u5fA",
"id": "chatcmpl-ASYMT7913Sp58qhZqQgY7g7Ia2J4M",
"object": "chat.completion",
"created": 1730680117,
"created": 1731368633,
"model": "gpt-4o-mini-2024-07-18",
"choices": [
{
Expand All @@ -71,10 +75,14 @@ interactions:
"completion_tokens": 12,
"total_tokens": 24,
"prompt_tokens_details": {
"cached_tokens": 0
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"service_tier": "default",
Expand All @@ -84,13 +92,13 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8dd07c2d0a5a9f98-SIN
- 8e1225a3f8e9ce65-SIN
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Mon, 04 Nov 2024 00:28:37 GMT
- Mon, 11 Nov 2024 23:43:53 GMT
Server:
- cloudflare
Set-Cookie: test_set_cookie
Expand All @@ -103,10 +111,10 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
content-length:
- '697'
openai-organization: test_organization
- '825'
openai-organization: test_openai_org_id
openai-processing-ms:
- '228'
- '431'
openai-version:
- '2020-10-01'
strict-transport-security:
Expand All @@ -120,11 +128,11 @@ interactions:
x-ratelimit-remaining-tokens:
- '199943'
x-ratelimit-reset-requests:
- 13.724s
- 14.746s
x-ratelimit-reset-tokens:
- 16ms
x-request-id:
- req_0ded46a4535c24c36ef58363b7538421
- req_81e29a8992ea8001c0240bd990acf0ab
status:
code: 200
message: OK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ interactions:
- application/json
accept-encoding:
- gzip, deflate
authorization:
- Bearer test_openai_api_key
connection:
- keep-alive
content-length:
Expand All @@ -26,7 +28,7 @@ interactions:
host:
- api.openai.com
user-agent:
- OpenAI/Python 1.26.0
- OpenAI/Python 1.54.3
x-stainless-arch:
- arm64
x-stainless-async:
Expand All @@ -36,7 +38,9 @@ interactions:
x-stainless-os:
- MacOS
x-stainless-package-version:
- 1.26.0
- 1.54.3
x-stainless-retry-count:
- '0'
x-stainless-runtime:
- CPython
x-stainless-runtime-version:
Expand All @@ -47,16 +51,16 @@ interactions:
body:
string: |-
{
"id": "chatcmpl-APfFO3w0cNVOphe5Lk9EaYyRaS2pm",
"id": "chatcmpl-ASYMUBq69UHDarAz2fsd0O50rv0r1",
"object": "chat.completion",
"created": 1730680118,
"created": 1731368634,
"model": "gpt-4o-mini-2024-07-18",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This is a test.",
"content": "This is a test. How can I assist you further?",
"refusal": null
},
"logprobs": null,
Expand All @@ -66,7 +70,7 @@ interactions:
"index": 1,
"message": {
"role": "assistant",
"content": "This is a test! How can I assist you further?",
"content": "This is a test. How can I assist you further?",
"refusal": null
},
"logprobs": null,
Expand All @@ -75,13 +79,17 @@ interactions:
],
"usage": {
"prompt_tokens": 12,
"completion_tokens": 17,
"total_tokens": 29,
"completion_tokens": 24,
"total_tokens": 36,
"prompt_tokens_details": {
"cached_tokens": 0
"cached_tokens": 0,
"audio_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 0
"reasoning_tokens": 0,
"audio_tokens": 0,
"accepted_prediction_tokens": 0,
"rejected_prediction_tokens": 0
}
},
"system_fingerprint": "fp_0ba0d124f1"
Expand All @@ -90,13 +98,13 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 8dd07c30beda3dd4-SIN
- 8e1225a91a253e53-SIN
Connection:
- keep-alive
Content-Type:
- application/json
Date:
- Mon, 04 Nov 2024 00:28:38 GMT
- Mon, 11 Nov 2024 23:43:54 GMT
Server:
- cloudflare
Set-Cookie: test_set_cookie
Expand All @@ -109,10 +117,10 @@ interactions:
alt-svc:
- h3=":443"; ma=86400
content-length:
- '872'
openai-organization: test_organization
- '1030'
openai-organization: test_openai_org_id
openai-processing-ms:
- '261'
- '399'
openai-version:
- '2020-10-01'
strict-transport-security:
Expand All @@ -126,11 +134,11 @@ interactions:
x-ratelimit-remaining-tokens:
- '199962'
x-ratelimit-reset-requests:
- 21.785s
- 22.564s
x-ratelimit-reset-tokens:
- 11ms
x-request-id:
- req_86ab6a7a85f95e2a001cfeb89e0827b1
- req_01290a92a1a3d787c7a00bb3836da597
status:
code: 200
message: OK
Expand Down
Loading

0 comments on commit 89a0b28

Please sign in to comment.