* Modifies a message.
(
key: IntegrationTaskKey,
threadId: string,
messageId: string,
body: Prettify<OpenAI.Beta.Threads.MessageUpdateParams>,
options: OpenAIRequestOptions = {}
)
| 714 | * Modifies a message. |
| 715 | */ |
| 716 | async update( |
| 717 | key: IntegrationTaskKey, |
| 718 | threadId: string, |
| 719 | messageId: string, |
| 720 | body: Prettify<OpenAI.Beta.Threads.MessageUpdateParams>, |
| 721 | options: OpenAIRequestOptions = {} |
| 722 | ): Promise<OpenAI.Beta.Threads.ThreadMessage> { |
| 723 | return this.runTask( |
| 724 | key, |
| 725 | async (client, task, io) => { |
| 726 | const { data, response } = await client.beta.threads.messages |
| 727 | .update(threadId, messageId, body, { |
| 728 | idempotencyKey: task.idempotencyKey, |
| 729 | ...options, |
| 730 | }) |
| 731 | .withResponse(); |
| 732 | |
| 733 | task.outputProperties = createTaskOutputProperties(undefined, response.headers); |
| 734 | |
| 735 | return data; |
| 736 | }, |
| 737 | { |
| 738 | name: "Update Message", |
| 739 | properties: [ |
| 740 | { label: "threadId", text: threadId }, |
| 741 | { label: "messageId", text: messageId }, |
| 742 | ], |
| 743 | }, |
| 744 | handleOpenAIError |
| 745 | ); |
| 746 | } |
| 747 | } |
nothing calls this directly
no test coverage detected