(assistantId: string, threadId: string)
| 112 | * @returns {Promise<void>} - A promise that resolves when the assistant is successfully run. |
| 113 | */ |
| 114 | export const runChatAssistant = async (assistantId: string, threadId: string): Promise<string | null> => { |
| 115 | |
| 116 | console.log('Running chat assistant...'); |
| 117 | |
| 118 | const response = await runAssistant(assistantId, threadId); |
| 119 | const runId = response.runId; |
| 120 | |
| 121 | console.log('Chat assistant run successfully. Run ID:', runId); |
| 122 | return runId; |
| 123 | }; |
| 124 | |
| 125 | /** |
| 126 | * Deletes a file from the chat assistant. |
no test coverage detected