Skip to main content
This is used inside the OpenAI Integration for Tasks like Chat Completions Background Create

Parameters

string
required
Should be a stable and unique cache key inside the run(). See resumability for more information.
string
required
The url to fetch.
object
Options for the request
object
An object where the key is a status code pattern and the value is a retrying strategy. Supported patterns are:
  • Specific status codes: 429
  • Ranges: 500-599
  • Wildcards: 2xx, 3xx, 4xx, 5xx
An individual retrying strategy can be one of two types:
  • backoff: Retries the request with an exponential backoff.
  • headers: Retries the request using info from the response headers.
object
Allows you to set timeouts for the request, as well as specific retry strategies for timeouts.

Returns

A Promise that resolves with the JSON response body of the background fetch request. You can specify the type of the response body as a generic parameter.