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

Method list

integrations/openai/src/threads.ts:517–548  ·  view source on GitHub ↗

* Returns all runs belonging to a thread.

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

Source from the content-addressed store, hash-verified

515 * Returns all runs belonging to a thread.
516 */
517 async list(
518 key: IntegrationTaskKey,
519 threadId: string,
520 options: OpenAIRequestOptions = {}
521 ): Promise<OpenAI.Beta.Threads.Run[]> {
522 return this.runTask(
523 key,
524 async (client, task, io) => {
525 const { data: page, response } = await client.beta.threads.runs
526 .list(threadId, {
527 idempotencyKey: task.idempotencyKey,
528 ...options,
529 })
530 .withResponse();
531
532 const allRuns = [];
533
534 for await (const fineTuningJob of page) {
535 allRuns.push(fineTuningJob);
536 }
537
538 task.outputProperties = createTaskOutputProperties(undefined, response.headers);
539
540 return allRuns;
541 },
542 {
543 name: "List Runs",
544 properties: [{ label: "threadId", text: threadId }],
545 },
546 handleOpenAIError
547 );
548 }
549}
550
551class Messages {

Callers 2

listMethod · 0.45
listAllMethod · 0.45

Calls 3

withResponseMethod · 0.80
runTaskMethod · 0.45

Tested by

no test coverage detected