(
key: IntegrationTaskKey,
id: string,
options: OpenAIRequestOptions = {}
)
| 190 | } |
| 191 | |
| 192 | async retrieve( |
| 193 | key: IntegrationTaskKey, |
| 194 | id: string, |
| 195 | options: OpenAIRequestOptions = {} |
| 196 | ): Promise<OpenAI.Beta.Assistant> { |
| 197 | return this.runTask( |
| 198 | key, |
| 199 | async (client, task) => { |
| 200 | const { data, response } = await client.beta.assistants |
| 201 | .retrieve(id, { |
| 202 | idempotencyKey: task.idempotencyKey, |
| 203 | ...options, |
| 204 | }) |
| 205 | .withResponse(); |
| 206 | |
| 207 | task.outputProperties = createTaskOutputProperties(undefined, response.headers); |
| 208 | |
| 209 | return data; |
| 210 | }, |
| 211 | { |
| 212 | name: "Retrieve Assistant", |
| 213 | params: { |
| 214 | id, |
| 215 | }, |
| 216 | properties: [ |
| 217 | { |
| 218 | label: "assistantId", |
| 219 | text: id, |
| 220 | }, |
| 221 | ], |
| 222 | }, |
| 223 | handleOpenAIError |
| 224 | ); |
| 225 | } |
| 226 | } |
nothing calls this directly
no test coverage detected