MCPcopy
hub / github.com/triggerdotdev/trigger.dev / retrieve

Method retrieve

integrations/openai/src/assistants.ts:192–225  ·  view source on GitHub ↗
(
    key: IntegrationTaskKey,
    id: string,
    options: OpenAIRequestOptions = {}
  )

Source from the content-addressed store, hash-verified

190 }
191
192 async retrieve(
193 key: IntegrationTaskKey,
194 id: string,
195 options: OpenAIRequestOptions = {}
196 ): Promise<OpenAI.Beta.Assistant> {
197 return this.runTask(
198 key,
199 async (client, task) => {
200 const { data, response } = await client.beta.assistants
201 .retrieve(id, {
202 idempotencyKey: task.idempotencyKey,
203 ...options,
204 })
205 .withResponse();
206
207 task.outputProperties = createTaskOutputProperties(undefined, response.headers);
208
209 return data;
210 },
211 {
212 name: "Retrieve Assistant",
213 params: {
214 id,
215 },
216 properties: [
217 {
218 label: "assistantId",
219 text: id,
220 },
221 ],
222 },
223 handleOpenAIError
224 );
225 }
226}

Callers

nothing calls this directly

Calls 3

withResponseMethod · 0.80
runTaskMethod · 0.45

Tested by

no test coverage detected