Skip to content

Commit

Permalink
chore: getLastRun
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanVor committed Dec 20, 2024
1 parent 6b0b997 commit 4ac7875
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions clients/ai-assistants-v1/sdk/threadSdk.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,12 @@ export class ThreadWithSdk {
return Object.assign(p, { getAssistantResponse });
}

getLastRun() {
return this.runSdk
.getLastByThread({ threadId: this.thread.id })
.then((run) => this.runSdk.listen({ runId: run.id }));
}

listMessages(props: Omit<ListMessagesProps, 'threadId'>, args?: ClientCallArgs) {
return this.messageSdk.list({ threadId: this.thread.id, ...props }, args);
}
Expand Down

0 comments on commit 4ac7875

Please sign in to comment.