mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
add doc string for /chat/completions swagger
This commit is contained in:
parent
67eb58d9f8
commit
f6e80b0031
2 changed files with 38 additions and 10 deletions
|
@ -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 = {}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue