Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions packages/langbase/src/langbase/langbase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -1092,7 +1092,7 @@ export class Langbase {
private async runLlm(
options: LlmOptions | LlmOptionsStream,
): Promise<RunResponse | RunResponseStream> {
if (!options.llmKey) {
if (!options.apiKey) {
throw new Error('LLM API key is required to run this LLM.');
}

Expand All @@ -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}),
},
});
}
Expand Down
Loading