add doc string for /chat/completions swagger

This commit is contained in:
Ishaan Jaff 2024-08-22 09:27:17 -07:00
parent 6fd4c7fd54
commit 2caee891e0
2 changed files with 38 additions and 10 deletions

View file

@ -3014,6 +3014,29 @@ async def chat_completion(
model: Optional[str] = None,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
"""
Follows the exact same API spec as `OpenAI's Chat API https://platform.openai.com/docs/api-reference/chat`
```bash
curl -X POST http://localhost:4000/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer sk-1234" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello!"
}
]
}'
```
"""
global general_settings, user_debug, proxy_logging_obj, llm_model_list
data = {}