Skip to content

Commit dcf732b

Browse files
committed
feat(api): add additional instructions for runs (#586)
1 parent 88253e6 commit dcf732b

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

src/resources/beta/threads/runs/runs.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,8 +343,16 @@ export interface RunCreateParams {
343343
assistant_id: string;
344344

345345
/**
346-
* Override the default system message of the assistant. This is useful for
347-
* modifying the behavior on a per-run basis.
346+
* Appends additional instructions at the end of the instructions for the run. This
347+
* is useful for modifying the behavior on a per-run basis without overriding other
348+
* instructions.
349+
*/
350+
additional_instructions?: string | null;
351+
352+
/**
353+
* Overrides the
354+
* [instructions](https://platform.openai.com/docs/api-reference/assistants/createAssistant)
355+
* of the assistant. This is useful for modifying the behavior on a per-run basis.
348356
*/
349357
instructions?: string | null;
350358

tests/api-resources/beta/threads/runs/runs.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ describe('resource runs', () => {
2323
test('create: required and optional params', async () => {
2424
const response = await openai.beta.threads.runs.create('string', {
2525
assistant_id: 'string',
26+
additional_instructions: 'string',
2627
instructions: 'string',
2728
metadata: {},
2829
model: 'string',

0 commit comments

Comments
 (0)