MCPcopy Index your code
hub / github.com/triggerdotdev/trigger.dev / update

Method update

integrations/openai/src/threads.ts:716–746  ·  view source on GitHub ↗

* Modifies a message.

(
    key: IntegrationTaskKey,
    threadId: string,
    messageId: string,
    body: Prettify<OpenAI.Beta.Threads.MessageUpdateParams>,
    options: OpenAIRequestOptions = {}
  )

Source from the content-addressed store, hash-verified

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}

Callers

nothing calls this directly

Calls 4

withResponseMethod · 0.80
runTaskMethod · 0.45
updateMethod · 0.45

Tested by

no test coverage detected