From 17a42b2f6e2de2dce338358a48f6d7d4ed723f6f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 16:32:31 +0000 Subject: [PATCH 1/4] chore(ci): codeowners file (#980) --- .github/CODEOWNERS | 3 +++ .github/workflows/create-releases.yml | 1 + .github/workflows/release-doctor.yml | 1 + bin/check-release-environment | 1 + 4 files changed, 6 insertions(+) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 3ce5f8d00..d58c8454c 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,4 @@ +# This file is used to automatically assign reviewers to PRs +# For more information see: https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners + * @openai/sdks-team diff --git a/.github/workflows/create-releases.yml b/.github/workflows/create-releases.yml index d6d802e16..d5ae1f755 100644 --- a/.github/workflows/create-releases.yml +++ b/.github/workflows/create-releases.yml @@ -62,3 +62,4 @@ jobs: env: DENO_PUSH_REMOTE_URL: https://username:${{ steps.generate_token.outputs.token }}@github.com/openai/openai-deno-build.git DENO_PUSH_BRANCH: main + diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 3bb1d714f..37bc09e80 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -21,3 +21,4 @@ jobs: env: STAINLESS_API_KEY: ${{ secrets.STAINLESS_API_KEY }} NPM_TOKEN: ${{ secrets.OPENAI_NPM_TOKEN || secrets.NPM_TOKEN }} + diff --git a/bin/check-release-environment b/bin/check-release-environment index 9651d95c8..dbfd546bf 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -23,3 +23,4 @@ if [[ lenErrors -gt 0 ]]; then fi echo "The environment is ready to push releases!" + From 7442643e8445eea15da54843a7c9d7580a402979 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 17:43:24 +0000 Subject: [PATCH 2/4] chore(ci): bump prism mock server version (#982) --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index f58615769..d2814ae6a 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" fi From 31b05aa6fa0445141ae17a1b1eff533b83735f3a Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Fri, 9 Aug 2024 19:49:33 +0100 Subject: [PATCH 3/4] fix(helpers/zod): nested union schema extraction (#979) --- .../zod-to-json-schema/zodToJsonSchema.ts | 36 +- tests/lib/__snapshots__/parser.test.ts.snap | 52 ++- tests/lib/parser.test.ts | 346 ++++++++++++++++-- 3 files changed, 378 insertions(+), 56 deletions(-) diff --git a/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts b/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts index 2078b503f..1c3290008 100644 --- a/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts +++ b/src/_vendor/zod-to-json-schema/zodToJsonSchema.ts @@ -43,24 +43,24 @@ const zodToJsonSchema = ( main.title = title; } - const definitions = - !isEmptyObj(refs.definitions) ? - Object.entries(refs.definitions).reduce( - (acc, [name, schema]) => ({ - ...acc, - [name]: - parseDef( - zodDef(schema), - { - ...refs, - currentPath: [...refs.basePath, refs.definitionPath, name], - }, - true, - ) ?? {}, - }), - {}, - ) - : undefined; + const definitions = (() => { + if (isEmptyObj(refs.definitions)) { + return undefined; + } + + const definitions: Record = {}; + + for (const [name, zodSchema] of Object.entries(refs.definitions)) { + definitions[name] = + parseDef( + zodDef(zodSchema), + { ...refs, currentPath: [...refs.basePath, refs.definitionPath, name] }, + true, + ) ?? {}; + } + + return definitions; + })(); const combined: ReturnType> = name === undefined ? diff --git a/tests/lib/__snapshots__/parser.test.ts.snap b/tests/lib/__snapshots__/parser.test.ts.snap index 715c268ff..d98db2345 100644 --- a/tests/lib/__snapshots__/parser.test.ts.snap +++ b/tests/lib/__snapshots__/parser.test.ts.snap @@ -2,16 +2,16 @@ exports[`.parse() zod deserialises response_format 1`] = ` "{ - "id": "chatcmpl-9tZXFjiGKgtrHZeIxvkklWe51DYZp", + "id": "chatcmpl-9uLhvwLPvKOZoJ7hwaa666fYuxYif", "object": "chat.completion", - "created": 1723031665, + "created": 1723216839, "model": "gpt-4o-2024-08-06", "choices": [ { "index": 0, "message": { "role": "assistant", - "content": "{\\"city\\":\\"San Francisco\\",\\"units\\":\\"f\\"}", + "content": "{\\"city\\":\\"San Francisco\\",\\"units\\":\\"c\\"}", "refusal": null }, "logprobs": null, @@ -30,16 +30,16 @@ exports[`.parse() zod deserialises response_format 1`] = ` exports[`.parse() zod merged schemas 2`] = ` "{ - "id": "chatcmpl-9tyPgktyF5JgREIZd0XZI4XgrBAD2", + "id": "chatcmpl-9uLi0HJ6HYH0FM1VI1N6XCREiGvX1", "object": "chat.completion", - "created": 1723127296, + "created": 1723216844, "model": "gpt-4o-2024-08-06", "choices": [ { "index": 0, "message": { "role": "assistant", - "content": "{\\"person1\\":{\\"name\\":\\"Jane Doe\\",\\"phone_number\\":\\"+1234567890\\",\\"roles\\":[\\"other\\"],\\"description\\":\\"Engineer at OpenAI. Email: jane@openai.com\\"},\\"person2\\":{\\"name\\":\\"John Smith\\",\\"phone_number\\":\\"+0987654321\\",\\"differentField\\":\\"Engineer at OpenAI. Email: john@openai.com\\"}}", + "content": "{\\"person1\\":{\\"name\\":\\"Jane Doe\\",\\"phone_number\\":\\".\\",\\"roles\\":[\\"other\\"],\\"description\\":\\"Engineer at OpenAI, born Nov 16, contact email: jane@openai.com\\"},\\"person2\\":{\\"name\\":\\"John Smith\\",\\"phone_number\\":\\"john@openai.com\\",\\"differentField\\":\\"Engineer at OpenAI, born March 1.\\"}}", "refusal": null }, "logprobs": null, @@ -51,23 +51,51 @@ exports[`.parse() zod merged schemas 2`] = ` "completion_tokens": 72, "total_tokens": 133 }, - "system_fingerprint": "fp_845eaabc1f" + "system_fingerprint": "fp_2a322c9ffc" +} +" +`; + +exports[`.parse() zod nested schema extraction 2`] = ` +"{ + "id": "chatcmpl-9uLi6hkH6VcoaYiNEzy3h56QRAyns", + "object": "chat.completion", + "created": 1723216850, + "model": "gpt-4o-2024-08-06", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\\"name\\":\\"TodoApp\\",\\"fields\\":[{\\"type\\":\\"string\\",\\"name\\":\\"taskId\\",\\"metadata\\":{\\"foo\\":\\"unique identifier for each task\\"}},{\\"type\\":\\"string\\",\\"name\\":\\"title\\",\\"metadata\\":{\\"foo\\":\\"title of the task\\"}},{\\"type\\":\\"string\\",\\"name\\":\\"description\\",\\"metadata\\":{\\"foo\\":\\"detailed description of the task. This is optional.\\"}},{\\"type\\":\\"string\\",\\"name\\":\\"status\\",\\"metadata\\":{\\"foo\\":\\"status of the task, e.g., pending, completed, etc.\\"}},{\\"type\\":\\"string\\",\\"name\\":\\"dueDate\\",\\"metadata\\":null},{\\"type\\":\\"string\\",\\"name\\":\\"priority\\",\\"metadata\\":{\\"foo\\":\\"priority level of the task, e.g., low, medium, high\\"}},{\\"type\\":\\"string\\",\\"name\\":\\"creationDate\\",\\"metadata\\":{\\"foo\\":\\"date when the task was created\\"}},{\\"type\\":\\"string\\",\\"name\\":\\"lastModifiedDate\\",\\"metadata\\":{\\"foo\\":\\"date when the task was last modified\\"}},{\\"type\\":\\"string\\",\\"name\\":\\"tags\\",\\"metadata\\":{\\"foo\\":\\"tags associated with the task, for categorization\\"}}]}", + "refusal": null + }, + "logprobs": null, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 36, + "completion_tokens": 208, + "total_tokens": 244 + }, + "system_fingerprint": "fp_2a322c9ffc" } " `; exports[`.parse() zod top-level recursive schemas 1`] = ` "{ - "id": "chatcmpl-9taiMDrRVRIkk1Xg1yE82UjnYuZjt", + "id": "chatcmpl-9uLhw79ArBF4KsQQOlsoE68m6vh6v", "object": "chat.completion", - "created": 1723036198, + "created": 1723216840, "model": "gpt-4o-2024-08-06", "choices": [ { "index": 0, "message": { "role": "assistant", - "content": "{\\"type\\":\\"form\\",\\"label\\":\\"User Profile Form\\",\\"children\\":[{\\"type\\":\\"field\\",\\"label\\":\\"Full Name\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"text\\"},{\\"name\\":\\"placeholder\\",\\"value\\":\\"Enter your full name\\"}]},{\\"type\\":\\"field\\",\\"label\\":\\"Email Address\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"email\\"},{\\"name\\":\\"placeholder\\",\\"value\\":\\"Enter your email address\\"}]},{\\"type\\":\\"field\\",\\"label\\":\\"Phone Number\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"tel\\"},{\\"name\\":\\"placeholder\\",\\"value\\":\\"Enter your phone number\\"}]},{\\"type\\":\\"button\\",\\"label\\":\\"Submit\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"submit\\"}]}],\\"attributes\\":[{\\"name\\":\\"method\\",\\"value\\":\\"post\\"},{\\"name\\":\\"action\\",\\"value\\":\\"/submit-profile\\"}]}", + "content": "{\\"type\\":\\"form\\",\\"label\\":\\"User Profile Form\\",\\"children\\":[{\\"type\\":\\"field\\",\\"label\\":\\"First Name\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"text\\"},{\\"name\\":\\"name\\",\\"value\\":\\"firstName\\"},{\\"name\\":\\"placeholder\\",\\"value\\":\\"Enter your first name\\"}]},{\\"type\\":\\"field\\",\\"label\\":\\"Last Name\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"text\\"},{\\"name\\":\\"name\\",\\"value\\":\\"lastName\\"},{\\"name\\":\\"placeholder\\",\\"value\\":\\"Enter your last name\\"}]},{\\"type\\":\\"field\\",\\"label\\":\\"Email Address\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"email\\"},{\\"name\\":\\"name\\",\\"value\\":\\"email\\"},{\\"name\\":\\"placeholder\\",\\"value\\":\\"Enter your email address\\"}]},{\\"type\\":\\"button\\",\\"label\\":\\"Submit\\",\\"children\\":[],\\"attributes\\":[{\\"name\\":\\"type\\",\\"value\\":\\"submit\\"}]}],\\"attributes\\":[]}", "refusal": null }, "logprobs": null, @@ -76,8 +104,8 @@ exports[`.parse() zod top-level recursive schemas 1`] = ` ], "usage": { "prompt_tokens": 38, - "completion_tokens": 168, - "total_tokens": 206 + "completion_tokens": 175, + "total_tokens": 213 }, "system_fingerprint": "fp_845eaabc1f" } diff --git a/tests/lib/parser.test.ts b/tests/lib/parser.test.ts index 3fb3c948a..331b16895 100644 --- a/tests/lib/parser.test.ts +++ b/tests/lib/parser.test.ts @@ -32,10 +32,10 @@ describe('.parse()', () => { "index": 0, "logprobs": null, "message": { - "content": "{"city":"San Francisco","units":"f"}", + "content": "{"city":"San Francisco","units":"c"}", "parsed": { "city": "San Francisco", - "units": "f", + "units": "c", }, "refusal": null, "role": "assistant", @@ -76,18 +76,9 @@ describe('.parse()', () => { expect(completion.choices[0]?.message).toMatchInlineSnapshot(` { - "content": "{"type":"form","label":"User Profile Form","children":[{"type":"field","label":"Full Name","children":[],"attributes":[{"name":"type","value":"text"},{"name":"placeholder","value":"Enter your full name"}]},{"type":"field","label":"Email Address","children":[],"attributes":[{"name":"type","value":"email"},{"name":"placeholder","value":"Enter your email address"}]},{"type":"field","label":"Phone Number","children":[],"attributes":[{"name":"type","value":"tel"},{"name":"placeholder","value":"Enter your phone number"}]},{"type":"button","label":"Submit","children":[],"attributes":[{"name":"type","value":"submit"}]}],"attributes":[{"name":"method","value":"post"},{"name":"action","value":"/submit-profile"}]}", + "content": "{"type":"form","label":"User Profile Form","children":[{"type":"field","label":"First Name","children":[],"attributes":[{"name":"type","value":"text"},{"name":"name","value":"firstName"},{"name":"placeholder","value":"Enter your first name"}]},{"type":"field","label":"Last Name","children":[],"attributes":[{"name":"type","value":"text"},{"name":"name","value":"lastName"},{"name":"placeholder","value":"Enter your last name"}]},{"type":"field","label":"Email Address","children":[],"attributes":[{"name":"type","value":"email"},{"name":"name","value":"email"},{"name":"placeholder","value":"Enter your email address"}]},{"type":"button","label":"Submit","children":[],"attributes":[{"name":"type","value":"submit"}]}],"attributes":[]}", "parsed": { - "attributes": [ - { - "name": "method", - "value": "post", - }, - { - "name": "action", - "value": "/submit-profile", - }, - ], + "attributes": [], "children": [ { "attributes": [ @@ -95,43 +86,55 @@ describe('.parse()', () => { "name": "type", "value": "text", }, + { + "name": "name", + "value": "firstName", + }, { "name": "placeholder", - "value": "Enter your full name", + "value": "Enter your first name", }, ], "children": [], - "label": "Full Name", + "label": "First Name", "type": "field", }, { "attributes": [ { "name": "type", - "value": "email", + "value": "text", + }, + { + "name": "name", + "value": "lastName", }, { "name": "placeholder", - "value": "Enter your email address", + "value": "Enter your last name", }, ], "children": [], - "label": "Email Address", + "label": "Last Name", "type": "field", }, { "attributes": [ { "name": "type", - "value": "tel", + "value": "email", + }, + { + "name": "name", + "value": "email", }, { "name": "placeholder", - "value": "Enter your phone number", + "value": "Enter your email address", }, ], "children": [], - "label": "Phone Number", + "label": "Email Address", "type": "field", }, { @@ -467,22 +470,313 @@ describe('.parse()', () => { expect(completion.choices[0]?.message).toMatchInlineSnapshot(` { - "content": "{"person1":{"name":"Jane Doe","phone_number":"+1234567890","roles":["other"],"description":"Engineer at OpenAI. Email: jane@openai.com"},"person2":{"name":"John Smith","phone_number":"+0987654321","differentField":"Engineer at OpenAI. Email: john@openai.com"}}", + "content": "{"person1":{"name":"Jane Doe","phone_number":".","roles":["other"],"description":"Engineer at OpenAI, born Nov 16, contact email: jane@openai.com"},"person2":{"name":"John Smith","phone_number":"john@openai.com","differentField":"Engineer at OpenAI, born March 1."}}", "parsed": { "person1": { - "description": "Engineer at OpenAI. Email: jane@openai.com", + "description": "Engineer at OpenAI, born Nov 16, contact email: jane@openai.com", "name": "Jane Doe", - "phone_number": "+1234567890", + "phone_number": ".", "roles": [ "other", ], }, "person2": { - "differentField": "Engineer at OpenAI. Email: john@openai.com", + "differentField": "Engineer at OpenAI, born March 1.", "name": "John Smith", - "phone_number": "+0987654321", + "phone_number": "john@openai.com", + }, + }, + "refusal": null, + "role": "assistant", + "tool_calls": [], + } + `); + }); + + test('nested schema extraction', async () => { + // optional object that can be on each field, mark it as nullable to comply with structured output restrictions + const metadata = z.nullable( + z.object({ + foo: z.string(), + }), + ); + + // union element a + const fieldA = z.object({ + type: z.literal('string'), + name: z.string(), + metadata, + }); + + // union element b, both referring to above nullable object + const fieldB = z.object({ + type: z.literal('number'), + metadata, + }); + + // top level input object with array of union element + const model = z.object({ + name: z.string(), + fields: z.array(z.union([fieldA, fieldB])), + }); + + expect(zodResponseFormat(model, 'query').json_schema.schema).toMatchInlineSnapshot(` + { + "$schema": "http://json-schema.org/draft-07/schema#", + "additionalProperties": false, + "definitions": { + "contactPerson_properties_person1_properties_name": { + "type": "string", + }, + "contactPerson_properties_person1_properties_phone_number": { + "nullable": true, + "type": "string", + }, + "query": { + "additionalProperties": false, + "properties": { + "fields": { + "items": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "metadata": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "foo": { + "type": "string", + }, + }, + "required": [ + "foo", + ], + "type": "object", + }, + { + "type": "null", + }, + ], + }, + "name": { + "type": "string", + }, + "type": { + "const": "string", + "type": "string", + }, + }, + "required": [ + "type", + "name", + "metadata", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "metadata": { + "$ref": "#/definitions/query_properties_fields_items_anyOf_0_properties_metadata", + }, + "type": { + "const": "number", + "type": "string", + }, + }, + "required": [ + "type", + "metadata", + ], + "type": "object", + }, + ], + }, + "type": "array", + }, + "name": { + "type": "string", + }, + }, + "required": [ + "name", + "fields", + ], + "type": "object", + }, + "query_properties_fields_items_anyOf_0_properties_metadata": { + "anyOf": [ + { + "$ref": "#/definitions/query_properties_fields_items_anyOf_0_properties_metadata_anyOf_0", + }, + { + "type": "null", + }, + ], + }, + }, + "properties": { + "fields": { + "items": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "metadata": { + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "foo": { + "type": "string", + }, + }, + "required": [ + "foo", + ], + "type": "object", + }, + { + "type": "null", + }, + ], + }, + "name": { + "type": "string", + }, + "type": { + "const": "string", + "type": "string", + }, + }, + "required": [ + "type", + "name", + "metadata", + ], + "type": "object", + }, + { + "additionalProperties": false, + "properties": { + "metadata": { + "$ref": "#/definitions/query_properties_fields_items_anyOf_0_properties_metadata", + }, + "type": { + "const": "number", + "type": "string", + }, + }, + "required": [ + "type", + "metadata", + ], + "type": "object", + }, + ], + }, + "type": "array", + }, + "name": { + "type": "string", }, }, + "required": [ + "name", + "fields", + ], + "type": "object", + } + `); + + const completion = await makeSnapshotRequest( + (openai) => + openai.beta.chat.completions.parse({ + model: 'gpt-4o-2024-08-06', + messages: [ + { + role: 'system', + content: + "You are a helpful assistant. Generate a data model according to the user's instructions.", + }, + { role: 'user', content: 'create a todo app data model' }, + ], + response_format: zodResponseFormat(model, 'query'), + }), + 2, + ); + + expect(completion.choices[0]?.message).toMatchInlineSnapshot(` + { + "content": "{"name":"TodoApp","fields":[{"type":"string","name":"taskId","metadata":{"foo":"unique identifier for each task"}},{"type":"string","name":"title","metadata":{"foo":"title of the task"}},{"type":"string","name":"description","metadata":{"foo":"detailed description of the task. This is optional."}},{"type":"string","name":"status","metadata":{"foo":"status of the task, e.g., pending, completed, etc."}},{"type":"string","name":"dueDate","metadata":null},{"type":"string","name":"priority","metadata":{"foo":"priority level of the task, e.g., low, medium, high"}},{"type":"string","name":"creationDate","metadata":{"foo":"date when the task was created"}},{"type":"string","name":"lastModifiedDate","metadata":{"foo":"date when the task was last modified"}},{"type":"string","name":"tags","metadata":{"foo":"tags associated with the task, for categorization"}}]}", + "parsed": { + "fields": [ + { + "metadata": { + "foo": "unique identifier for each task", + }, + "name": "taskId", + "type": "string", + }, + { + "metadata": { + "foo": "title of the task", + }, + "name": "title", + "type": "string", + }, + { + "metadata": { + "foo": "detailed description of the task. This is optional.", + }, + "name": "description", + "type": "string", + }, + { + "metadata": { + "foo": "status of the task, e.g., pending, completed, etc.", + }, + "name": "status", + "type": "string", + }, + { + "metadata": null, + "name": "dueDate", + "type": "string", + }, + { + "metadata": { + "foo": "priority level of the task, e.g., low, medium, high", + }, + "name": "priority", + "type": "string", + }, + { + "metadata": { + "foo": "date when the task was created", + }, + "name": "creationDate", + "type": "string", + }, + { + "metadata": { + "foo": "date when the task was last modified", + }, + "name": "lastModifiedDate", + "type": "string", + }, + { + "metadata": { + "foo": "tags associated with the task, for categorization", + }, + "name": "tags", + "type": "string", + }, + ], + "name": "TodoApp", + }, "refusal": null, "role": "assistant", "tool_calls": [], From 398b3d421d5c202036f308b727cd9e6bb88ef856 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 18:49:52 +0000 Subject: [PATCH 4/4] release: 4.55.4 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 14 ++++++++++++++ README.md | 2 +- package.json | 2 +- scripts/build-deno | 2 +- src/version.ts | 2 +- 6 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d34e87f46..04004d7d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.55.3" + ".": "4.55.4" } diff --git a/CHANGELOG.md b/CHANGELOG.md index fefb710b2..d43fd4772 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,19 @@ # Changelog +## 4.55.4 (2024-08-09) + +Full Changelog: [v4.55.3...v4.55.4](https://github.com/openai/openai-node/compare/v4.55.3...v4.55.4) + +### Bug Fixes + +* **helpers/zod:** nested union schema extraction ([#979](https://github.com/openai/openai-node/issues/979)) ([31b05aa](https://github.com/openai/openai-node/commit/31b05aa6fa0445141ae17a1b1eff533b83735f3a)) + + +### Chores + +* **ci:** bump prism mock server version ([#982](https://github.com/openai/openai-node/issues/982)) ([7442643](https://github.com/openai/openai-node/commit/7442643e8445eea15da54843a7c9d7580a402979)) +* **ci:** codeowners file ([#980](https://github.com/openai/openai-node/issues/980)) ([17a42b2](https://github.com/openai/openai-node/commit/17a42b2f6e2de2dce338358a48f6d7d4ed723f6f)) + ## 4.55.3 (2024-08-08) Full Changelog: [v4.55.2...v4.55.3](https://github.com/openai/openai-node/compare/v4.55.2...v4.55.3) diff --git a/README.md b/README.md index 13f449a29..50f7f09e2 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ You can import in Deno via: ```ts -import OpenAI from 'https://deno.land/x/openai@v4.55.3/mod.ts'; +import OpenAI from 'https://deno.land/x/openai@v4.55.4/mod.ts'; ``` diff --git a/package.json b/package.json index 31f5bc16a..9110c179b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.55.3", + "version": "4.55.4", "description": "The official TypeScript library for the OpenAI API", "author": "OpenAI ", "types": "dist/index.d.ts", diff --git a/scripts/build-deno b/scripts/build-deno index cd4cbd4f5..79fd58ea4 100755 --- a/scripts/build-deno +++ b/scripts/build-deno @@ -16,7 +16,7 @@ This is a build produced from https://github.com/openai/openai-node – please g Usage: \`\`\`ts -import OpenAI from "https://deno.land/x/openai@v4.55.3/mod.ts"; +import OpenAI from "https://deno.land/x/openai@v4.55.4/mod.ts"; const client = new OpenAI(); \`\`\` diff --git a/src/version.ts b/src/version.ts index ec9119c18..f4a031b0b 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.55.3'; // x-release-please-version +export const VERSION = '4.55.4'; // x-release-please-version