diff --git a/src/__tests__/unit/chat-resources.test.ts b/src/__tests__/unit/chat-resources.test.ts index 0f2968d..f866baf 100644 --- a/src/__tests__/unit/chat-resources.test.ts +++ b/src/__tests__/unit/chat-resources.test.ts @@ -94,6 +94,7 @@ describe('Chat resource', () => { messages, model: 'gpt-4', stream: false, + safety_identifier: 'oai-guardrails-ts', }); expect(client.handleLlmResponse).toHaveBeenCalledWith( { id: 'chat-response' }, @@ -153,6 +154,7 @@ describe('Responses resource', () => { model: 'gpt-4o', stream: false, tools: undefined, + safety_identifier: 'oai-guardrails-ts', }); expect(client.handleLlmResponse).toHaveBeenCalledWith( { id: 'responses-api' }, diff --git a/src/resources/chat/chat.ts b/src/resources/chat/chat.ts index f859484..7be01b6 100644 --- a/src/resources/chat/chat.ts +++ b/src/resources/chat/chat.ts @@ -89,6 +89,8 @@ export class ChatCompletions { model, stream, ...kwargs, + // @ts-ignore - safety_identifier is not defined in OpenAI types yet + safety_identifier: 'oai-guardrails-ts', }), ]); diff --git a/src/resources/responses/responses.ts b/src/resources/responses/responses.ts index 0441af4..468e4e5 100644 --- a/src/resources/responses/responses.ts +++ b/src/resources/responses/responses.ts @@ -85,6 +85,8 @@ export class Responses { stream, tools, ...kwargs, + // @ts-ignore - safety_identifier is not defined in OpenAI types yet + safety_identifier: 'oai-guardrails-ts', }), ]);