Skip to content

Commit

Permalink
Update cassettes of openai test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
jieguangzhou authored and blythed committed Nov 12, 2023
1 parent 3b1333a commit 6faaa14
Show file tree
Hide file tree
Showing 27 changed files with 3,949 additions and 826 deletions.
188 changes: 180 additions & 8 deletions test/integration/ext/openai/cassettes/test_batch_chat.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,184 @@
interactions:
- request:
body: fake_body
headers: {}
method: GET
uri: https://api.openai.com/v1/models
response:
content: "{\n \"object\": \"list\",\n \"data\": [\n {\n \"id\": \"text-search-babbage-doc-001\",\n
\ \"object\": \"model\",\n \"created\": 1651172509,\n \"owned_by\":
\"openai-dev\"\n },\n {\n \"id\": \"gpt-3.5-turbo-16k-0613\",\n \"object\":
\"model\",\n \"created\": 1685474247,\n \"owned_by\": \"openai\"\n
\ },\n {\n \"id\": \"curie-search-query\",\n \"object\": \"model\",\n
\ \"created\": 1651172509,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"gpt-3.5-turbo-16k\",\n \"object\": \"model\",\n
\ \"created\": 1683758102,\n \"owned_by\": \"openai-internal\"\n },\n
\ {\n \"id\": \"text-search-babbage-query-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172509,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"babbage\",\n \"object\": \"model\",\n \"created\":
1649358449,\n \"owned_by\": \"openai\"\n },\n {\n \"id\": \"babbage-search-query\",\n
\ \"object\": \"model\",\n \"created\": 1651172509,\n \"owned_by\":
\"openai-dev\"\n },\n {\n \"id\": \"text-babbage-001\",\n \"object\":
\"model\",\n \"created\": 1649364043,\n \"owned_by\": \"openai\"\n
\ },\n {\n \"id\": \"text-similarity-davinci-001\",\n \"object\":
\"model\",\n \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n
\ },\n {\n \"id\": \"gpt-4-1106-preview\",\n \"object\": \"model\",\n
\ \"created\": 1698957206,\n \"owned_by\": \"system\"\n },\n {\n
\ \"id\": \"davinci-similarity\",\n \"object\": \"model\",\n \"created\":
1651172509,\n \"owned_by\": \"openai-dev\"\n },\n {\n \"id\":
\"code-davinci-edit-001\",\n \"object\": \"model\",\n \"created\":
1649880484,\n \"owned_by\": \"openai\"\n },\n {\n \"id\": \"curie-similarity\",\n
\ \"object\": \"model\",\n \"created\": 1651172510,\n \"owned_by\":
\"openai-dev\"\n },\n {\n \"id\": \"babbage-search-document\",\n
\ \"object\": \"model\",\n \"created\": 1651172510,\n \"owned_by\":
\"openai-dev\"\n },\n {\n \"id\": \"curie-instruct-beta\",\n \"object\":
\"model\",\n \"created\": 1649364042,\n \"owned_by\": \"openai\"\n
\ },\n {\n \"id\": \"gpt-3.5-turbo\",\n \"object\": \"model\",\n
\ \"created\": 1677610602,\n \"owned_by\": \"openai\"\n },\n {\n
\ \"id\": \"gpt-3.5-turbo-1106\",\n \"object\": \"model\",\n \"created\":
1698959748,\n \"owned_by\": \"system\"\n },\n {\n \"id\": \"text-search-ada-doc-001\",\n
\ \"object\": \"model\",\n \"created\": 1651172507,\n \"owned_by\":
\"openai-dev\"\n },\n {\n \"id\": \"davinci-instruct-beta\",\n \"object\":
\"model\",\n \"created\": 1649364042,\n \"owned_by\": \"openai\"\n
\ },\n {\n \"id\": \"text-similarity-babbage-001\",\n \"object\":
\"model\",\n \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n
\ },\n {\n \"id\": \"text-search-davinci-doc-001\",\n \"object\":
\"model\",\n \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n
\ },\n {\n \"id\": \"babbage-similarity\",\n \"object\": \"model\",\n
\ \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"text-embedding-ada-002\",\n \"object\": \"model\",\n
\ \"created\": 1671217299,\n \"owned_by\": \"openai-internal\"\n },\n
\ {\n \"id\": \"davinci-search-query\",\n \"object\": \"model\",\n
\ \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"gpt-4-vision-preview\",\n \"object\": \"model\",\n
\ \"created\": 1698894917,\n \"owned_by\": \"system\"\n },\n {\n
\ \"id\": \"text-similarity-curie-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172507,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"gpt-4\",\n \"object\": \"model\",\n \"created\":
1687882411,\n \"owned_by\": \"openai\"\n },\n {\n \"id\": \"text-davinci-001\",\n
\ \"object\": \"model\",\n \"created\": 1649364042,\n \"owned_by\":
\"openai\"\n },\n {\n \"id\": \"text-search-davinci-query-001\",\n
\ \"object\": \"model\",\n \"created\": 1651172505,\n \"owned_by\":
\"openai-dev\"\n },\n {\n \"id\": \"ada-search-document\",\n \"object\":
\"model\",\n \"created\": 1651172507,\n \"owned_by\": \"openai-dev\"\n
\ },\n {\n \"id\": \"ada-code-search-code\",\n \"object\": \"model\",\n
\ \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"babbage-002\",\n \"object\": \"model\",\n \"created\":
1692634615,\n \"owned_by\": \"system\"\n },\n {\n \"id\": \"davinci-002\",\n
\ \"object\": \"model\",\n \"created\": 1692634301,\n \"owned_by\":
\"system\"\n },\n {\n \"id\": \"davinci-search-document\",\n \"object\":
\"model\",\n \"created\": 1651172509,\n \"owned_by\": \"openai-dev\"\n
\ },\n {\n \"id\": \"curie-search-document\",\n \"object\": \"model\",\n
\ \"created\": 1651172508,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"babbage-code-search-code\",\n \"object\": \"model\",\n
\ \"created\": 1651172509,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"text-search-ada-query-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"code-search-ada-text-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172507,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"babbage-code-search-text\",\n \"object\": \"model\",\n
\ \"created\": 1651172509,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"code-search-babbage-code-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172507,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"ada-search-query\",\n \"object\": \"model\",\n \"created\":
1651172505,\n \"owned_by\": \"openai-dev\"\n },\n {\n \"id\":
\"ada-code-search-text\",\n \"object\": \"model\",\n \"created\":
1651172510,\n \"owned_by\": \"openai-dev\"\n },\n {\n \"id\":
\"tts-1-hd\",\n \"object\": \"model\",\n \"created\": 1699046015,\n
\ \"owned_by\": \"system\"\n },\n {\n \"id\": \"text-search-curie-query-001\",\n
\ \"object\": \"model\",\n \"created\": 1651172509,\n \"owned_by\":
\"openai-dev\"\n },\n {\n \"id\": \"text-davinci-002\",\n \"object\":
\"model\",\n \"created\": 1649880484,\n \"owned_by\": \"openai\"\n
\ },\n {\n \"id\": \"text-davinci-edit-001\",\n \"object\": \"model\",\n
\ \"created\": 1649809179,\n \"owned_by\": \"openai\"\n },\n {\n
\ \"id\": \"code-search-babbage-text-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172507,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"tts-1-hd-1106\",\n \"object\": \"model\",\n \"created\":
1699053533,\n \"owned_by\": \"system\"\n },\n {\n \"id\": \"whisper-1\",\n
\ \"object\": \"model\",\n \"created\": 1677532384,\n \"owned_by\":
\"openai-internal\"\n },\n {\n \"id\": \"gpt-3.5-turbo-instruct-0914\",\n
\ \"object\": \"model\",\n \"created\": 1694122472,\n \"owned_by\":
\"system\"\n },\n {\n \"id\": \"ada\",\n \"object\": \"model\",\n
\ \"created\": 1649357491,\n \"owned_by\": \"openai\"\n },\n {\n
\ \"id\": \"gpt-3.5-turbo-0613\",\n \"object\": \"model\",\n \"created\":
1686587434,\n \"owned_by\": \"openai\"\n },\n {\n \"id\": \"text-ada-001\",\n
\ \"object\": \"model\",\n \"created\": 1649364042,\n \"owned_by\":
\"openai\"\n },\n {\n \"id\": \"canary-whisper\",\n \"object\":
\"model\",\n \"created\": 1699656801,\n \"owned_by\": \"system\"\n
\ },\n {\n \"id\": \"ada-similarity\",\n \"object\": \"model\",\n
\ \"created\": 1651172507,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"code-search-ada-code-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172507,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"text-similarity-ada-001\",\n \"object\": \"model\",\n
\ \"created\": 1651172505,\n \"owned_by\": \"openai-dev\"\n },\n
\ {\n \"id\": \"gpt-3.5-turbo-0301\",\n \"object\": \"model\",\n
\ \"created\": 1677649963,\n \"owned_by\": \"openai\"\n },\n {\n
\ \"id\": \"gpt-3.5-turbo-instruct\",\n \"object\": \"model\",\n \"created\":
1692901427,\n \"owned_by\": \"system\"\n },\n {\n \"id\": \"gpt-4-0613\",\n
\ \"object\": \"model\",\n \"created\": 1686588896,\n \"owned_by\":
\"openai\"\n },\n {\n \"id\": \"text-search-curie-doc-001\",\n \"object\":
\"model\",\n \"created\": 1651172509,\n \"owned_by\": \"openai-dev\"\n
\ },\n {\n \"id\": \"text-davinci-003\",\n \"object\": \"model\",\n
\ \"created\": 1669599635,\n \"owned_by\": \"openai-internal\"\n },\n
\ {\n \"id\": \"text-curie-001\",\n \"object\": \"model\",\n \"created\":
1649364043,\n \"owned_by\": \"openai\"\n },\n {\n \"id\": \"curie\",\n
\ \"object\": \"model\",\n \"created\": 1649359874,\n \"owned_by\":
\"openai\"\n },\n {\n \"id\": \"gpt-4-0314\",\n \"object\":
\"model\",\n \"created\": 1687882410,\n \"owned_by\": \"openai\"\n
\ },\n {\n \"id\": \"canary-tts\",\n \"object\": \"model\",\n
\ \"created\": 1699492935,\n \"owned_by\": \"system\"\n },\n {\n
\ \"id\": \"tts-1\",\n \"object\": \"model\",\n \"created\": 1681940951,\n
\ \"owned_by\": \"openai-internal\"\n },\n {\n \"id\": \"davinci\",\n
\ \"object\": \"model\",\n \"created\": 1649359874,\n \"owned_by\":
\"openai\"\n },\n {\n \"id\": \"dall-e-2\",\n \"object\": \"model\",\n
\ \"created\": 1698798177,\n \"owned_by\": \"system\"\n },\n {\n
\ \"id\": \"tts-1-1106\",\n \"object\": \"model\",\n \"created\":
1699053241,\n \"owned_by\": \"system\"\n },\n {\n \"id\": \"dall-e-3\",\n
\ \"object\": \"model\",\n \"created\": 1698785189,\n \"owned_by\":
\"system\"\n }\n ]\n}\n"
headers:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 824445159bafa700-PHX
Connection:
- keep-alive
Content-Encoding:
- gzip
Content-Type:
- application/json
Date:
- Sat, 11 Nov 2023 05:52:34 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=SmZ34n9.xql91j3PBgEb8BgFn01zgqLq7gZ3kmBa.M0-1699681954-0-AacbZ96hHIHivd75f951MguO6xBOCj569uFbJLM67MI1ltgHnscOCMDVtjLRRmzlKk+Vm3UAK4hlFD13UeDjjqM=;
path=/; expires=Sat, 11-Nov-23 06:22:34 GMT; domain=.api.openai.com; HttpOnly;
Secure; SameSite=None
Transfer-Encoding:
- chunked
access-control-allow-origin:
- '*'
alt-svc:
- h3=":443"; ma=86400
openai-processing-ms:
- '132'
openai-version:
- '2020-10-01'
strict-transport-security:
- max-age=15724800; includeSubDomains
x-request-id:
- 21876640502c71b582a9dda97cc94f82
http_version: HTTP/1.1
status_code: 200
- request:
body: fake_body
headers: {}
method: POST
uri: https://api.openai.com/v1/chat/completions
response:
content: "{\n \"id\": \"chatcmpl-8J2g58Le7ot3shVE82qOIzbN721Fq\",\n \"object\":
\"chat.completion\",\n \"created\": 1699549217,\n \"model\": \"gpt-3.5-turbo-0613\",\n
content: "{\n \"id\": \"chatcmpl-8JbD25w1gEPsx0P2BxeYVfYMqC7Qe\",\n \"object\":
\"chat.completion\",\n \"created\": 1699681956,\n \"model\": \"gpt-3.5-turbo-0613\",\n
\ \"choices\": [\n {\n \"index\": 0,\n \"message\": {\n \"role\":
\"assistant\",\n \"content\": \"Hello! How can I assist you today?\"\n
\ },\n \"finish_reason\": \"stop\"\n }\n ],\n \"usage\": {\n \"prompt_tokens\":
Expand All @@ -15,7 +187,7 @@ interactions:
CF-Cache-Status:
- DYNAMIC
CF-RAY:
- 82379c6e7d9a2b5b-LAX
- 8244451e1af82f5d-LAX
Cache-Control:
- no-cache, must-revalidate
Connection:
Expand All @@ -25,12 +197,12 @@ interactions:
Content-Type:
- application/json
Date:
- Thu, 09 Nov 2023 17:00:34 GMT
- Sat, 11 Nov 2023 05:52:49 GMT
Server:
- cloudflare
Set-Cookie:
- __cf_bm=VsstUV6z0AsBqlhZoNWLeDYbItQPaITRwrvgMPUfjq4-1699549234-0-AVtpK2RypOVPDcJ/Ur5rVAT7vlM7zge3J5NmCC8JhhPbCp0XkqFZGS8is+iWrV96+KecE99K7CudGGpnMUpVSQo=;
path=/; expires=Thu, 09-Nov-23 17:30:34 GMT; domain=.api.openai.com; HttpOnly;
- __cf_bm=JlcdjzeGtC8i4mo0DWM7zbL9.zss7FUaOsXQVKiy_GQ-1699681969-0-AQn9z7OEbfgMqO6u0izxx/+LA/cbwdMkJakOVk8yEbXxjvUCoc3sxHWgxj69CvxgV63ul7s3e7xbTP8EZCxzyrE=;
path=/; expires=Sat, 11-Nov-23 06:22:49 GMT; domain=.api.openai.com; HttpOnly;
Secure; SameSite=None
Transfer-Encoding:
- chunked
Expand All @@ -43,7 +215,7 @@ interactions:
openai-organization:
- user-vp5fxwabufahnpgnwgptlchk
openai-processing-ms:
- '17446'
- '12482'
openai-version:
- '2020-10-01'
strict-transport-security:
Expand All @@ -61,7 +233,7 @@ interactions:
x-ratelimit-reset-tokens:
- 14ms
x-request-id:
- 6286d92547b87911ab51d7b16eb7b0c9
- 88fe62a6bcf938e0306815c4343d9fec
http_version: HTTP/1.1
status_code: 200
version: 1
Loading

0 comments on commit 6faaa14

Please sign in to comment.