File tree Expand file tree Collapse file tree 2 files changed +19
-4
lines changed
Expand file tree Collapse file tree 2 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -2,5 +2,5 @@ export const GENERATION_ENDPOINTS = [
22 '/v1/pipes/run' ,
33 '/beta/chat' ,
44 '/beta/generate' ,
5- '/v1/llm /run' ,
5+ '/v1/agent /run' ,
66] ;
Original file line number Diff line number Diff line change @@ -81,6 +81,21 @@ export interface RunResponse {
8181 } ;
8282}
8383
84+ export interface AgentRunResponse {
85+ output : string ;
86+ threadId ?: string ;
87+ id : string ;
88+ object : string ;
89+ created : number ;
90+ model : string ;
91+ choices : ChoiceGenerate [ ] ;
92+ usage : Usage ;
93+ system_fingerprint : string | null ;
94+ rawResponse ?: {
95+ headers : Record < string , string > ;
96+ } ;
97+ }
98+
8499export interface RunResponseStream {
85100 stream : ReadableStream < any > ;
86101 threadId : string | null ;
@@ -583,7 +598,7 @@ export class Langbase {
583598 public agent : {
584599 run : {
585600 ( options : AgentRunOptionsStream ) : Promise < RunResponseStream > ;
586- ( options : AgentRunOptions ) : Promise < RunResponse > ;
601+ ( options : AgentRunOptions ) : Promise < AgentRunResponse > ;
587602 } ;
588603 } ;
589604
@@ -1094,11 +1109,11 @@ export class Langbase {
10941109 options : AgentRunOptionsStream ,
10951110 ) : Promise < RunResponseStream > ;
10961111
1097- private async runAgent ( options : AgentRunOptions ) : Promise < RunResponse > ;
1112+ private async runAgent ( options : AgentRunOptions ) : Promise < AgentRunResponse > ;
10981113
10991114 private async runAgent (
11001115 options : AgentRunOptions | AgentRunOptionsStream ,
1101- ) : Promise < RunResponse | RunResponseStream > {
1116+ ) : Promise < AgentRunResponse | RunResponseStream > {
11021117 if ( ! options . apiKey ) {
11031118 throw new Error ( 'LLM API key is required to run this LLM.' ) ;
11041119 }
You can’t perform that action at this time.
0 commit comments