@@ -21,25 +21,25 @@ class PromptEngine {
2121 run_prompt_direct ( params : PromptRunParams & { stream : true } ) : Promise < RunPromptResponseStream < string > > ;
2222 run_prompt_direct ( params : PromptRunParams & { stream ?: false } ) : Promise < RunPromptDirectResponse > ;
2323 async run_prompt_direct ( params : PromptRunParams ) : Promise < RunPromptDirectResponse | RunPromptResponseStream < string > > {
24- const resp = await this . client . fetchJSS ( `/prompt_engine/run` , "POST" , params ) ;
24+ const resp = await this . client . fetchJSS ( `/v1/ prompt_engine/run` , "POST" , params ) ;
2525 if ( ! params . stream ) {
2626 return resp as RunPromptDirectResponse ;
2727 }
2828 return Stream . fromReadableStream < string > ( resp . body ) as RunPromptResponseStream < string > ;
2929 }
3030 get = async ( id : string ) : Promise < PromptGetResponse > => {
31- return await this . client . fetchJSS ( `/prompt_engine/${ id } ` , "GET" , { } ) ;
31+ return await this . client . fetchJSS ( `/v1/ prompt_engine/${ id } ` , "GET" , { } ) ;
3232 } ;
3333 list = async ( params : PromptListParams = { limit : 20 , page : 0 } ) : Promise < PromptListResponse > => {
34- return await this . client . fetchJSS ( "/prompt_engine" , "GET" , { } , params ) ;
34+ return await this . client . fetchJSS ( "/v1/ prompt_engine" , "GET" , { } , params ) ;
3535 } ;
3636 delete = async ( id : string ) : Promise < { prompt_engine_id : string } > => {
37- return await this . client . fetchJSS ( `/prompt_engine/${ id } ` , "DELETE" , { } ) ;
37+ return await this . client . fetchJSS ( `/v1/ prompt_engine/${ id } ` , "DELETE" , { } ) ;
3838 } ;
3939 run ( params : PromptExecuteParams & { stream : true } ) : Promise < RunPromptResponseStream < string > > ;
4040 run ( params : PromptExecuteParams & { stream ?: false } ) : Promise < RunPromptResponse > ;
4141 async run ( params : PromptExecuteParams ) : Promise < RunPromptResponseStream < string > | RunPromptResponse > {
42- const resp = await this . client . fetchJSS ( `/prompt_engine/${ params . id } ` , "POST" , params ) ;
42+ const resp = await this . client . fetchJSS ( `/v1/ prompt_engine/${ params . id } ` , "POST" , params ) ;
4343 if ( ! params . stream ) {
4444 return resp as RunPromptResponse ;
4545 }
0 commit comments