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

Method retrieve

integrations/openai/src/threads.ts:682–711  ·  view source on GitHub ↗

* Retrieve a message.

(
    key: IntegrationTaskKey,
    threadId: string,
    messageId: string,
    options: OpenAIRequestOptions = {}
  )

Source from the content-addressed store, hash-verified

680 * Retrieve a message.
681 */
682 async retrieve(
683 key: IntegrationTaskKey,
684 threadId: string,
685 messageId: string,
686 options: OpenAIRequestOptions = {}
687 ): Promise<OpenAI.Beta.Threads.ThreadMessage> {
688 return this.runTask(
689 key,
690 async (client, task, io) => {
691 const { data, response } = await client.beta.threads.messages
692 .retrieve(threadId, messageId, {
693 idempotencyKey: task.idempotencyKey,
694 ...options,
695 })
696 .withResponse();
697
698 task.outputProperties = createTaskOutputProperties(undefined, response.headers);
699
700 return data;
701 },
702 {
703 name: "Retrieve Message",
704 properties: [
705 { label: "threadId", text: threadId },
706 { label: "messageId", text: messageId },
707 ],
708 },
709 handleOpenAIError
710 );
711 }
712
713 /**
714 * Modifies a message.

Callers

nothing calls this directly

Calls 4

withResponseMethod · 0.80
runTaskMethod · 0.45
retrieveMethod · 0.45

Tested by

no test coverage detected