mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-08 03:08:45 +00:00
docs(scheduler.md): cleanup docs to use /chat/completion endpoint
This commit is contained in:
parent
381fc213f8
commit
2710bec02d
1 changed files with 4 additions and 4 deletions
|
|
@ -41,7 +41,7 @@ router = Router(
|
|||
)
|
||||
|
||||
try:
|
||||
_response = await router.schedule_acompletion( # 👈 ADDS TO QUEUE + POLLS + MAKES CALL
|
||||
_response = await router.acompletion( # 👈 ADDS TO QUEUE + POLLS + MAKES CALL
|
||||
model="gpt-3.5-turbo",
|
||||
messages=[{"role": "user", "content": "Hey!"}],
|
||||
priority=0, # 👈 LOWER IS BETTER
|
||||
|
|
@ -52,13 +52,13 @@ except Exception as e:
|
|||
|
||||
## LiteLLM Proxy
|
||||
|
||||
To prioritize requests on LiteLLM Proxy call our beta openai-compatible `http://localhost:4000/queue` endpoint.
|
||||
To prioritize requests on LiteLLM Proxy add `priority` to the request.
|
||||
|
||||
<Tabs>
|
||||
<TabItem value="curl" label="curl">
|
||||
|
||||
```curl
|
||||
curl -X POST 'http://localhost:4000/queue/chat/completions' \
|
||||
curl -X POST 'http://localhost:4000/chat/completions' \
|
||||
-H 'Content-Type: application/json' \
|
||||
-H 'Authorization: Bearer sk-1234' \
|
||||
-D '{
|
||||
|
|
@ -128,7 +128,7 @@ router = Router(
|
|||
)
|
||||
|
||||
try:
|
||||
_response = await router.schedule_acompletion( # 👈 ADDS TO QUEUE + POLLS + MAKES CALL
|
||||
_response = await router.acompletion( # 👈 ADDS TO QUEUE + POLLS + MAKES CALL
|
||||
model="gpt-3.5-turbo",
|
||||
messages=[{"role": "user", "content": "Hey!"}],
|
||||
priority=0, # 👈 LOWER IS BETTER
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue