(
key: IntegrationTaskKey,
id: string,
params: Prettify<OpenAI.Beta.AssistantUpdateParams>,
options: OpenAIRequestOptions = {}
)
| 56 | } |
| 57 | |
| 58 | async update( |
| 59 | key: IntegrationTaskKey, |
| 60 | id: string, |
| 61 | params: Prettify<OpenAI.Beta.AssistantUpdateParams>, |
| 62 | options: OpenAIRequestOptions = {} |
| 63 | ): Promise<OpenAI.Beta.Assistant> { |
| 64 | return this.runTask( |
| 65 | key, |
| 66 | async (client, task) => { |
| 67 | const { data, response } = await client.beta.assistants |
| 68 | .update(id, params, { |
| 69 | idempotencyKey: task.idempotencyKey, |
| 70 | ...options, |
| 71 | }) |
| 72 | .withResponse(); |
| 73 | |
| 74 | const outputProperties = createTaskOutputProperties(undefined, response.headers); |
| 75 | |
| 76 | task.outputProperties = [ |
| 77 | ...(outputProperties ?? []), |
| 78 | { |
| 79 | label: "assistantId", |
| 80 | text: data.id, |
| 81 | }, |
| 82 | ]; |
| 83 | |
| 84 | return data; |
| 85 | }, |
| 86 | { |
| 87 | name: "Update Assistant", |
| 88 | params, |
| 89 | properties: [ |
| 90 | ...(params.model ? [{ label: "model", text: params.model }] : []), |
| 91 | ...(params.name ? [{ label: "name", text: params.name }] : []), |
| 92 | ...(params.file_ids && params.file_ids.length > 0 |
| 93 | ? [{ label: "files", text: params.file_ids.join(", ") }] |
| 94 | : []), |
| 95 | ], |
| 96 | }, |
| 97 | handleOpenAIError |
| 98 | ); |
| 99 | } |
| 100 | |
| 101 | list( |
| 102 | key: IntegrationTaskKey, |
nothing calls this directly
no test coverage detected