Skip to content

Commit bfb23a4

Browse files
👌 IMPROVE: LLM run key (#92)
1 parent 744b9ee commit bfb23a4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/langbase/src/langbase/langbase.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export interface RunOptionsStreamT extends RunOptionsBase {
2727
export interface LlmOptionsBase {
2828
messages: PromptMessage[];
2929
model: string;
30-
llmKey: string;
30+
apiKey: string;
3131
top_p?: number;
3232
max_tokens?: number;
3333
temperature?: number;
@@ -1092,7 +1092,7 @@ export class Langbase {
10921092
private async runLlm(
10931093
options: LlmOptions | LlmOptionsStream,
10941094
): Promise<RunResponse | RunResponseStream> {
1095-
if (!options.llmKey) {
1095+
if (!options.apiKey) {
10961096
throw new Error('LLM API key is required to run this LLM.');
10971097
}
10981098

@@ -1105,7 +1105,7 @@ export class Langbase {
11051105
endpoint: '/v1/llm/run',
11061106
body: options,
11071107
headers: {
1108-
...(options.llmKey && {'LB-LLM-Key': options.llmKey}),
1108+
...(options.apiKey && {'LB-LLM-Key': options.apiKey}),
11091109
},
11101110
});
11111111
}

0 commit comments

Comments
 (0)