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

Method update

integrations/openai/src/threads.ts:194–220  ·  view source on GitHub ↗

* Modifies a thread.

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

Source from the content-addressed store, hash-verified

192 * Modifies a thread.
193 */
194 async update(
195 key: IntegrationTaskKey,
196 threadId: string,
197 body: ThreadUpdateParams,
198 options: OpenAIRequestOptions = {}
199 ): Promise<OpenAI.Beta.Thread> {
200 return this.runTask(
201 key,
202 async (client, task) => {
203 const { data, response } = await client.beta.threads
204 .update(threadId, body, {
205 idempotencyKey: task.idempotencyKey,
206 ...options,
207 })
208 .withResponse();
209
210 task.outputProperties = createTaskOutputProperties(undefined, response.headers);
211
212 return data;
213 },
214 {
215 name: "Update Thread",
216 properties: [{ label: "threadId", text: threadId }],
217 },
218 handleOpenAIError
219 );
220 }
221
222 /**
223 * Delete a thread.

Callers 8

updateMethod · 0.45
openai.tsFile · 0.45
status.tsFile · 0.45
invoke.tsFile · 0.45
resend.tsFile · 0.45
doEnvVarsFunction · 0.45
doSchedulesFunction · 0.45
hooks.tsFile · 0.45

Calls 3

withResponseMethod · 0.80
runTaskMethod · 0.45

Tested by

no test coverage detected