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

Method retrieve

integrations/openai/src/threads.ts:411–440  ·  view source on GitHub ↗

* Retrieves a run.

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

Source from the content-addressed store, hash-verified

409 * Retrieves a run.
410 */
411 async retrieve(
412 key: IntegrationTaskKey,
413 threadId: string,
414 runId: string,
415 options: OpenAIRequestOptions = {}
416 ): Promise<OpenAI.Beta.Threads.Run> {
417 return this.runTask(
418 key,
419 async (client, task, io) => {
420 const { data, response } = await client.beta.threads.runs
421 .retrieve(threadId, runId, {
422 idempotencyKey: task.idempotencyKey,
423 ...options,
424 })
425 .withResponse();
426
427 task.outputProperties = createTaskOutputProperties(undefined, response.headers);
428
429 return data;
430 },
431 {
432 name: "Retrieve Run",
433 properties: [
434 { label: "threadId", text: threadId },
435 { label: "runId", text: runId },
436 ],
437 },
438 handleOpenAIError
439 );
440 }
441
442 /**
443 * Cancels a run that is `in_progress`.

Callers 2

retrieveMethod · 0.45
retrieveMethod · 0.45

Calls 3

withResponseMethod · 0.80
runTaskMethod · 0.45

Tested by

no test coverage detected