Fallback to OpenAI
To enable fallback to OpenAI, you can simply pass thefallback option to the openpipe object with the model property set to the OpenAI model you want to fall back to.
- Python
- NodeJS
Timeout Fallback
If a request takes too long to execute, you can set a timeout for the fallback. In the example below, the request will fall back to OpenAI after 10 seconds.- Python
- NodeJS
Fallback to Custom OpenAI Compatible Client
If you want to use another OpenAI-compatible fallback client, you can pass afallback_client to the openpipe object.
- Python
- NodeJS