From 86b33bec670192574999942bfdd6e4fef9465b25 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 11 Sep 2024 14:22:26 +0000 Subject: [PATCH] feat(api): OpenAPI spec update via Stainless API --- .stats.yml | 2 +- src/resources/chat/completions.ts | 7 +++++++ src/resources/completions.ts | 7 +++++++ tests/api-resources/chat/completions.test.ts | 1 + tests/api-resources/completions.test.ts | 1 + 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index eb7cfea9..1441dc8a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 15 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-376ba2026d4957224e490000b809c5a4432c3d114d641c991b50dd860c6f8b39.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/togetherai%2FTogetherAI-0e56a0b2cfbbe66858d33d487ae2bef80a5acdaf99bf16029ef2006d5804b27d.yml diff --git a/src/resources/chat/completions.ts b/src/resources/chat/completions.ts index 4fbc0227..966644bd 100644 --- a/src/resources/chat/completions.ts +++ b/src/resources/chat/completions.ts @@ -111,6 +111,8 @@ export namespace ChatCompletionChunk { index: number; logprobs?: number | null; + + seed?: number | null; } export namespace Choice { @@ -227,6 +229,11 @@ export interface CompletionCreateParamsBase { */ safety_model?: string; + /** + * Seed value for reproducibility. + */ + seed?: number; + /** * A list of string sequences that will truncate (stop) inference text output. For * example, "" will stop generation as soon as the model generates the given diff --git a/src/resources/completions.ts b/src/resources/completions.ts index b6090e72..602c9c33 100644 --- a/src/resources/completions.ts +++ b/src/resources/completions.ts @@ -52,6 +52,8 @@ export namespace Completion { logprobs?: CompletionsAPI.LogProbs; + seed?: number; + text?: string; } @@ -186,6 +188,11 @@ export interface CompletionCreateParamsBase { */ safety_model?: string; + /** + * Seed value for reproducibility. + */ + seed?: number; + /** * A list of string sequences that will truncate (stop) inference text output. For * example, "" will stop generation as soon as the model generates the given diff --git a/tests/api-resources/chat/completions.test.ts b/tests/api-resources/chat/completions.test.ts index 6de16e5d..98c45abf 100644 --- a/tests/api-resources/chat/completions.test.ts +++ b/tests/api-resources/chat/completions.test.ts @@ -47,6 +47,7 @@ describe('resource completions', () => { repetition_penalty: 0, response_format: { schema: { foo: 'string' }, type: 'json' }, safety_model: 'safety_model_name', + seed: 42, stop: ['string', 'string', 'string'], stream: false, temperature: 0, diff --git a/tests/api-resources/completions.test.ts b/tests/api-resources/completions.test.ts index e9958d53..28294a4d 100644 --- a/tests/api-resources/completions.test.ts +++ b/tests/api-resources/completions.test.ts @@ -37,6 +37,7 @@ describe('resource completions', () => { presence_penalty: 0, repetition_penalty: 0, safety_model: 'safety_model_name', + seed: 42, stop: ['string', 'string', 'string'], stream: false, temperature: 0,