From dcf732bf1cd9c9be6d818d45d3658a43bcf795c5 Mon Sep 17 00:00:00 2001 From: Stainless Bot <107565488+stainless-bot@users.noreply.github.com> Date: Tue, 19 Dec 2023 18:16:56 -0500 Subject: [PATCH] feat(api): add additional instructions for runs (#586) --- src/resources/beta/threads/runs/runs.ts | 12 ++++++++++-- tests/api-resources/beta/threads/runs/runs.test.ts | 1 + 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/resources/beta/threads/runs/runs.ts b/src/resources/beta/threads/runs/runs.ts index f59fdff3f..8709ebabe 100644 --- a/src/resources/beta/threads/runs/runs.ts +++ b/src/resources/beta/threads/runs/runs.ts @@ -343,8 +343,16 @@ export interface RunCreateParams { assistant_id: string; /** - * Override the default system message of the assistant. This is useful for - * modifying the behavior on a per-run basis. + * Appends additional instructions at the end of the instructions for the run. This + * is useful for modifying the behavior on a per-run basis without overriding other + * instructions. + */ + additional_instructions?: string | null; + + /** + * Overrides the + * [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant) + * of the assistant. This is useful for modifying the behavior on a per-run basis. */ instructions?: string | null; diff --git a/tests/api-resources/beta/threads/runs/runs.test.ts b/tests/api-resources/beta/threads/runs/runs.test.ts index 0705ac528..5a720afce 100644 --- a/tests/api-resources/beta/threads/runs/runs.test.ts +++ b/tests/api-resources/beta/threads/runs/runs.test.ts @@ -23,6 +23,7 @@ describe('resource runs', () => { test('create: required and optional params', async () => { const response = await openai.beta.threads.runs.create('string', { assistant_id: 'string', + additional_instructions: 'string', instructions: 'string', metadata: {}, model: 'string',