From d3f885ebb34cf0fee92f027675787ef193402971 Mon Sep 17 00:00:00 2001 From: Ahmad Bilal Date: Wed, 19 Mar 2025 06:11:12 +0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=8C=20IMPROVE:=20LLM=20run=20key?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/langbase/src/langbase/langbase.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/langbase/src/langbase/langbase.ts b/packages/langbase/src/langbase/langbase.ts index 5542e78..8fce6c5 100644 --- a/packages/langbase/src/langbase/langbase.ts +++ b/packages/langbase/src/langbase/langbase.ts @@ -27,7 +27,7 @@ export interface RunOptionsStreamT extends RunOptionsBase { export interface LlmOptionsBase { messages: PromptMessage[]; model: string; - llmKey: string; + apiKey: string; top_p?: number; max_tokens?: number; temperature?: number; @@ -1092,7 +1092,7 @@ export class Langbase { private async runLlm( options: LlmOptions | LlmOptionsStream, ): Promise { - if (!options.llmKey) { + if (!options.apiKey) { throw new Error('LLM API key is required to run this LLM.'); } @@ -1105,7 +1105,7 @@ export class Langbase { endpoint: '/v1/llm/run', body: options, headers: { - ...(options.llmKey && {'LB-LLM-Key': options.llmKey}), + ...(options.apiKey && {'LB-LLM-Key': options.apiKey}), }, }); }