Provider Slug.
anyscaleObiguard SDK Integration with Anyscale
1. Install the Obiguard SDK
- Python SDK
2. Initialize Obiguard with an access key
To use Anyscale with Obiguard, get your Anyscale API key from here. Add it to Obiguard as a provider credential, then create an access key for the agent or project that will call it.- Python SDK
3. Invoke Chat Completions with Anyscale
- Python SDK
Directly Using Obiguard’s REST API
Alternatively, you can also directly call Anyscale models through Obiguard’s REST API - it works exactly the same as OpenAI API, with 2 differences:- You send your requests to Obiguard’s complete Gateway URL
https://gateway.obiguard.ai/v1/chat/completions - You have to add Obiguard specific headers.
x-obiguard-api-keyfor sending your Obiguard access key
Using the OpenAI Python or Node SDKs for Anyscale
You can also use thebaseURL param in the standard OpenAI SDKs and make calls to Obiguard + Anyscale directly from there. Like the Rest API example, you are only required to change the baseURL and add defaultHeaders to your instance. You can use the Obiguard SDK to make it simpler:
- OpenAI Python SDK
Advanced Use Cases
Streaming Responses
Obiguard supports streaming responses using Server Sent Events (SSE).- OpenAI Python SDK

