-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix arg ordering after switch from bytecode wrapping (bytecode wrappi…
…ng made args[0] be object self/cls ref)
- Loading branch information
Showing
4 changed files
with
132 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
77 changes: 77 additions & 0 deletions
77
tests/contrib/openai/cassettes/v1/completion_stream_wrong_api_key.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
interactions: | ||
- request: | ||
body: '{"model":"text-curie-001","prompt":"how does openai tokenize prompts?","max_tokens":150,"n":1,"stream":true,"temperature":0.8}' | ||
headers: | ||
accept: | ||
- application/json | ||
accept-encoding: | ||
- gzip, deflate | ||
connection: | ||
- keep-alive | ||
content-length: | ||
- '126' | ||
content-type: | ||
- application/json | ||
host: | ||
- api.openai.com | ||
user-agent: | ||
- OpenAI/Python 1.59.7 | ||
x-stainless-arch: | ||
- arm64 | ||
x-stainless-async: | ||
- 'false' | ||
x-stainless-lang: | ||
- python | ||
x-stainless-os: | ||
- MacOS | ||
x-stainless-package-version: | ||
- 1.59.7 | ||
x-stainless-retry-count: | ||
- '0' | ||
x-stainless-runtime: | ||
- CPython | ||
x-stainless-runtime-version: | ||
- 3.13.1 | ||
method: POST | ||
uri: https://api.openai.com/v1/completions | ||
response: | ||
body: | ||
string: "{\n \"error\": {\n \"message\": \"Incorrect API key provided: | ||
sk-wrong****-key. You can find your API key at https://platform.openai.com/account/api-keys.\",\n | ||
\ \"type\": \"invalid_request_error\",\n \"param\": null,\n \"code\": | ||
\"invalid_api_key\"\n }\n}\n" | ||
headers: | ||
CF-Cache-Status: | ||
- DYNAMIC | ||
CF-RAY: | ||
- 9058b3cc3bcdd63c-IAD | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '266' | ||
Content-Type: | ||
- application/json; charset=utf-8 | ||
Date: | ||
- Tue, 21 Jan 2025 16:32:48 GMT | ||
Server: | ||
- cloudflare | ||
Set-Cookie: | ||
- __cf_bm=WUZdhCkUNTJUEkju8qgk4MKCHL7CFOaIUNvU0L9XmvA-1737477168-1.0.1.1-RJ7MOiDyJEfHrXSN0WQVgZFtkxlkwBL3p.5t3._uu77WPJSM8tYzI3wMHSu.yMwD9QkrbgR5yavkTN.RTWl_1A; | ||
path=/; expires=Tue, 21-Jan-25 17:02:48 GMT; domain=.api.openai.com; HttpOnly; | ||
Secure; SameSite=None | ||
- _cfuvid=7KOfpy1ICNI532AjhDxBh2qtnyNpsjauHeWi6dEJgT4-1737477168271-0.0.1.1-604800000; | ||
path=/; domain=.api.openai.com; HttpOnly; Secure; SameSite=None | ||
X-Content-Type-Options: | ||
- nosniff | ||
alt-svc: | ||
- h3=":443"; ma=86400 | ||
strict-transport-security: | ||
- max-age=31536000; includeSubDomains; preload | ||
vary: | ||
- Origin | ||
x-request-id: | ||
- req_c45bfc7515dca54ef87c667f8210af23 | ||
status: | ||
code: 401 | ||
message: Unauthorized | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters