From 761f51424d669981ed158bd532ef9a7a08666a4f Mon Sep 17 00:00:00 2001 From: "Amos .E." Date: Tue, 8 Jul 2025 09:46:27 +0100 Subject: [PATCH] Fix null gpt options --- index.helper.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/index.helper.ts b/index.helper.ts index a8c0318..ff60d46 100644 --- a/index.helper.ts +++ b/index.helper.ts @@ -84,13 +84,13 @@ export default class ChatGptLlmHelper ...{ ...globalSettings, seed: - typeof options.seed === 'number' && options.seed >= 0 - ? options.seed + typeof options?.seed === 'number' && options?.seed >= 0 + ? options?.seed : null, - stop: !!options.stop ? options.stop : null, + stop: !!options?.stop ? options?.stop : null, top_logprobs: - typeof options.top_logprobs === 'number' && options.top_logprobs >= 0 - ? options.top_logprobs + typeof options?.top_logprobs === 'number' && options?.top_logprobs >= 0 + ? options?.top_logprobs : null, logit_bias: JSON.parse(globalSettings.logit_bias), max_completion_tokens: parseInt(