From 1cf81a216f62e7db5be0c830fbd9e615a80441db Mon Sep 17 00:00:00 2001 From: Archethect Date: Thu, 26 Dec 2024 17:38:52 +0100 Subject: [PATCH] fix(core) make modelConfiguration optional --- packages/core/src/generation.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/generation.ts b/packages/core/src/generation.ts index f93b5abe1b5..033720b5a9a 100644 --- a/packages/core/src/generation.ts +++ b/packages/core/src/generation.ts @@ -160,7 +160,7 @@ export async function generateText({ modelConfiguration?.maxInputTokens || models[provider].settings.maxInputTokens; const max_response_length = - modelConfiguration.max_response_length || + modelConfiguration?.max_response_length || models[provider].settings.maxOutputTokens; const apiKey = runtime.token;