OpenAI
Chat Completion Tasks
These are the docs for Trigger.dev v2 which will be deprecated on January 31st, 2025. You probably want the v3 docs.
Given a list of messages comprising a conversation, the model will return a response. Official OpenAI Docs
completions.create()
Creates a model response for the given chat conversation. Official OpenAI Docs
example.ts
completions.backgroundCreate()
Creates a model response for the given chat conversation, but runs the request in the background using io.backgroundFetch()
example.ts