[Feat-Proxy] Add Azure Assistants API - Create Assistant, Delete Assistant Support (#5777)

* update docs to show providers

* azure - move assistants in it's own file

* create new azure assistants file

* add azure create assistants

* add test for create / delete assistants

* azure add delete assistants support

* docs add Azure to support providers for assistants api

* fix linting errors

* fix standard logging merge conflict

* docs azure create assistants

* fix doc
This commit is contained in:
Ishaan Jaff 2024-09-18 16:27:33 -07:00 committed by GitHub
parent a109853d21
commit 7e07c37be7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 1172 additions and 897 deletions

View file

@ -7,6 +7,7 @@ Covers Threads, Messages, Assistants.
LiteLLM currently covers:
- Create Assistants
- Delete Assistants
- Get Assistants
- Create Thread
- Get Thread
@ -14,6 +15,12 @@ LiteLLM currently covers:
- Get Messages
- Run Thread
## **Supported Providers**:
- [OpenAI](#quick-start)
- [Azure OpenAI](#azure-openai)
- [OpenAI-Compatible APIs](#openai-compatible-apis)
## Quick Start
Call an existing Assistant.
@ -283,6 +290,32 @@ curl -X POST 'http://0.0.0.0:4000/threads/{thread_id}/runs' \
## [👉 Proxy API Reference](https://litellm-api.up.railway.app/#/assistants)
## Azure OpenAI
**config**
```yaml
assistant_settings:
custom_llm_provider: azure
litellm_params:
api_key: os.environ/AZURE_API_KEY
api_base: os.environ/AZURE_API_BASE
```
**curl**
```bash
curl -X POST "http://localhost:4000/v1/assistants" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-1234" \
-d '{
"instructions": "You are a personal math tutor. When asked a question, write and run Python code to answer the question.",
"name": "Math Tutor",
"tools": [{"type": "code_interpreter"}],
"model": "<my-azure-deployment-name>"
}'
```
## OpenAI-Compatible APIs
To call openai-compatible Assistants API's (eg. Astra Assistants API), just add `openai/` to the model name:

View file

@ -5,7 +5,7 @@ import TabItem from '@theme/TabItem';
Covers Batches, Files
Supported Providers:
## **Supported Providers**:
- Azure OpenAI
- OpenAI