File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
packages/langbase/src/langbase Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -12,11 +12,13 @@ export type Role = 'user' | 'assistant' | 'system' | 'tool';
1212export interface RunOptions extends RunOptionsT {
1313 name : string ;
1414 messages : Message [ ] ;
15+ apiKey ?: string ;
1516}
1617
1718export interface RunOptionsStream extends RunOptionsStreamT {
1819 name : string ;
1920 messages : Message [ ] ;
21+ apiKey ?: string ;
2022}
2123
2224export interface Function {
@@ -313,7 +315,7 @@ export class Langbase {
313315 options : RunOptions | RunOptionsStream ,
314316 ) : Promise < RunResponse | RunResponseStream > {
315317 const pipe = new PipeBaseAI ( {
316- apiKey : this . apiKey ,
318+ apiKey : options . apiKey ?? this . apiKey ,
317319 name : options . name ?. trim ( ) || '' , // Pipe name
318320 prod : true ,
319321 // default values
You can’t perform that action at this time.
0 commit comments