From 3d467b16b456d9045074e8472f70e063ab9edb4e Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Tue, 10 Dec 2024 19:40:18 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20check=20seed=20for=20NaN?= =?UTF-8?q?=20before=20deletion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/core/src/openai.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/openai.ts b/packages/core/src/openai.ts index 915349b8f6..03d18017c8 100644 --- a/packages/core/src/openai.ts +++ b/packages/core/src/openai.ts @@ -140,7 +140,7 @@ export const OpenAIChatCompletion: ChatCompletionHandler = async ( model, } satisfies CreateChatCompletionRequest) - if (postReq.seed && features?.seed === false) { + if (!isNaN(postReq.seed) && features?.seed === false) { logVerbose(`seed: disabled, not supported by ${provider}`) trace.itemValue(`seed`, `disabled`) delete postReq.seed // some providers do not support seed