File tree Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Expand file tree Collapse file tree 2 files changed +31
-1
lines changed Original file line number Diff line number Diff line change 1+ import utopianLabs from "../../utopian_labs.app.mjs" ;
2+
3+ export default {
4+ key : "utopian_labs-get-run-status" ,
5+ name : "Get Run Status" ,
6+ description : "Retrieve the status of an initiated run. [See the documentation](https://docs.utopianlabs.ai/research#retrieve-research-run-status)" ,
7+ version : "0.0.1" ,
8+ type : "action" ,
9+ props : {
10+ utopianLabs,
11+ runId : {
12+ type : "string" ,
13+ label : "Run ID" ,
14+ description : "The ID of the run you want to retrieve the status for." ,
15+ } ,
16+ } ,
17+ async run ( { $ } ) {
18+ const response = await this . utopianLabs . getRunStatus ( this . runId ) ;
19+ $ . export ( "$summary" , `Successfully retrieved status for run ${ this . runId } ` ) ;
20+ return response ;
21+ } ,
22+ } ;
Original file line number Diff line number Diff line change @@ -5,10 +5,18 @@ export default {
55 app : "utopian_labs" ,
66 propDefinitions : { } ,
77 methods : {
8- _getClient ( ) {
8+ _client ( ) {
99 return new UtopianLabs ( {
1010 apiKey : this . $auth . api_key ,
1111 } ) ;
1212 } ,
13+ initiateRun ( args ) {
14+ return this . _client ( ) . agents . runs . create ( args ) ;
15+ } ,
16+ getRunStatus ( run ) {
17+ return this . _client ( ) . agents . runs . get ( {
18+ run,
19+ } ) ;
20+ } ,
1321 } ,
1422} ;
You can’t perform that action at this time.
0 commit comments