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

Method retrieve

integrations/openai/src/threads.ts:164–189  ·  view source on GitHub ↗

* Retrieves a thread.

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

Source from the content-addressed store, hash-verified

162 * Retrieves a thread.
163 */
164 async retrieve(
165 key: IntegrationTaskKey,
166 threadId: string,
167 options: OpenAIRequestOptions = {}
168 ): Promise<OpenAI.Beta.Thread> {
169 return this.runTask(
170 key,
171 async (client, task) => {
172 const { data, response } = await client.beta.threads
173 .retrieve(threadId, {
174 idempotencyKey: task.idempotencyKey,
175 ...options,
176 })
177 .withResponse();
178
179 task.outputProperties = createTaskOutputProperties(undefined, response.headers);
180
181 return data;
182 },
183 {
184 name: "Retrieve Thread",
185 properties: [{ label: "threadId", text: threadId }],
186 },
187 handleOpenAIError
188 );
189 }
190
191 /**
192 * Modifies a thread.

Callers

nothing calls this directly

Calls 4

withResponseMethod · 0.80
runTaskMethod · 0.45
retrieveMethod · 0.45

Tested by

no test coverage detected