From 359eeb33b08b371451f216d1e21dd3334ec15f36 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Thu, 6 Jun 2024 14:55:21 -0400 Subject: [PATCH 1/2] feat(api): updates (#887) --- .stats.yml | 2 +- src/resources/beta/threads/runs/runs.ts | 14 ++++++++++++++ src/resources/beta/threads/threads.ts | 7 +++++++ src/resources/chat/completions.ts | 7 +++++++ tests/api-resources/beta/threads/runs/runs.test.ts | 1 + tests/api-resources/beta/threads/threads.test.ts | 1 + tests/api-resources/chat/completions.test.ts | 1 + 7 files changed, 32 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 11d2b0b18..eb81a249f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 64 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-0577fd0d08da6b867b002a5accd45f7116ef91c4940b41cf45dc479938c77163.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/openai-ff436357b12348b7c1c930469332a79cd23ac6ec537e645c411893c42de42e57.yml diff --git a/src/resources/beta/threads/runs/runs.ts b/src/resources/beta/threads/runs/runs.ts index 9e44ccfe5..ed5a5ff68 100644 --- a/src/resources/beta/threads/runs/runs.ts +++ b/src/resources/beta/threads/runs/runs.ts @@ -402,6 +402,13 @@ export interface Run { */ object: 'thread.run'; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls: boolean; + /** * Details on the action required to continue the run. Will be `null` if no action * is required. @@ -685,6 +692,13 @@ export interface RunCreateParamsBase { | 'gpt-3.5-turbo-16k-0613' | null; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls?: boolean; + /** * Specifies the format that the model must output. Compatible with * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), diff --git a/src/resources/beta/threads/threads.ts b/src/resources/beta/threads/threads.ts index 9d27b0328..6978e6eb5 100644 --- a/src/resources/beta/threads/threads.ts +++ b/src/resources/beta/threads/threads.ts @@ -560,6 +560,13 @@ export interface ThreadCreateAndRunParamsBase { | 'gpt-3.5-turbo-16k-0613' | null; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls?: boolean; + /** * Specifies the format that the model must output. Compatible with * [GPT-4o](https://platform.openai.com/docs/models/gpt-4o), diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index cbf7bcc2c..eeaab3d70 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -757,6 +757,13 @@ export interface ChatCompletionCreateParamsBase { */ n?: number | null; + /** + * Whether to enable + * [parallel function calling](https://platform.openai.com/docs/guides/function-calling) + * during tool use. + */ + parallel_tool_calls?: boolean; + /** * Number between -2.0 and 2.0. Positive values penalize new tokens based on * whether they appear in the text so far, increasing the model's likelihood to diff --git a/tests/api-resources/beta/threads/runs/runs.test.ts b/tests/api-resources/beta/threads/runs/runs.test.ts index 3ee6ecb4e..5aba82ff8 100644 --- a/tests/api-resources/beta/threads/runs/runs.test.ts +++ b/tests/api-resources/beta/threads/runs/runs.test.ts @@ -124,6 +124,7 @@ describe('resource runs', () => { max_prompt_tokens: 256, metadata: {}, model: 'gpt-4-turbo', + parallel_tool_calls: true, response_format: 'none', stream: false, temperature: 1, diff --git a/tests/api-resources/beta/threads/threads.test.ts b/tests/api-resources/beta/threads/threads.test.ts index ebc78f357..85f89533c 100644 --- a/tests/api-resources/beta/threads/threads.test.ts +++ b/tests/api-resources/beta/threads/threads.test.ts @@ -213,6 +213,7 @@ describe('resource threads', () => { max_prompt_tokens: 256, metadata: {}, model: 'gpt-4-turbo', + parallel_tool_calls: true, response_format: 'none', stream: false, temperature: 1, diff --git a/tests/api-resources/chat/completions.test.ts b/tests/api-resources/chat/completions.test.ts index 21277e1d6..9404e9e18 100644 --- a/tests/api-resources/chat/completions.test.ts +++ b/tests/api-resources/chat/completions.test.ts @@ -34,6 +34,7 @@ describe('resource completions', () => { logprobs: true, max_tokens: 0, n: 1, + parallel_tool_calls: true, presence_penalty: -2, response_format: { type: 'json_object' }, seed: -9223372036854776000, From 2ca2de3d8998e39b4b6e867f1dd3dc5ac3c0e76b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Jun 2024 18:55:45 +0000 Subject: [PATCH 2/2] release: 4.49.0 --- .release-please-manifest.json | 2 +- CHANGELOG.md | 8 ++++++++ README.md | 2 +- package.json | 2 +- scripts/build-deno | 2 +- src/version.ts | 2 +- 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b271b7c1e..999cfc01c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "4.48.3" + ".": "4.49.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 1e8d4c8d4..8853010a9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 4.49.0 (2024-06-06) + +Full Changelog: [v4.48.3...v4.49.0](https://github.com/openai/openai-node/compare/v4.48.3...v4.49.0) + +### Features + +* **api:** updates ([#887](https://github.com/openai/openai-node/issues/887)) ([359eeb3](https://github.com/openai/openai-node/commit/359eeb33b08b371451f216d1e21dd3334ec15f36)) + ## 4.48.3 (2024-06-06) Full Changelog: [v4.48.2...v4.48.3](https://github.com/openai/openai-node/compare/v4.48.2...v4.48.3) diff --git a/README.md b/README.md index 0169a18dc..acd36e4d1 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.48.3/mod.ts'; +import OpenAI from 'https://deno.land/x/openai@v4.49.0/mod.ts'; ``` diff --git a/package.json b/package.json index 14f7c3d5b..5a116918d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "openai", - "version": "4.48.3", + "version": "4.49.0", "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 fd2612a13..460fead2b 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.48.3/mod.ts"; +import OpenAI from "https://deno.land/x/openai@v4.49.0/mod.ts"; const client = new OpenAI(); \`\`\` diff --git a/src/version.ts b/src/version.ts index 0a2f1d907..bb12aad49 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export const VERSION = '4.48.3'; // x-release-please-version +export const VERSION = '4.49.0'; // x-release-please-version