mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
docs for input
This commit is contained in:
parent
a848c7b137
commit
254b0386c4
1 changed files with 12 additions and 14 deletions
|
@ -1,19 +1,16 @@
|
||||||
# Input Format
|
# Input Format
|
||||||
The Input params are **exactly the same** as the
|
The Input params are **exactly the same** as the <a href="https://platform.openai.com/docs/api-reference/chat/create" target="_blank" rel="noopener noreferrer">OpenAI Create chat completion</a>, and let you call 100+ models in the same format.
|
||||||
<a href="https://platform.openai.com/docs/api-reference/chat/create" target="_blank" rel="noopener noreferrer">OpenAI Create chat completion</a>, and let you call Azure OpenAI, Anthropic, Cohere, Replicate, OpenRouter models in the same format.
|
|
||||||
|
|
||||||
In addition, liteLLM allows you to pass in the following **Optional** liteLLM args:
|
|
||||||
`force_timeout`, `azure`, `logger_fn`, `verbose`
|
|
||||||
|
|
||||||
## Input - Request Body
|
## Input - Request Body
|
||||||
# Request Body
|
# Request Body
|
||||||
|
|
||||||
**Required Fields**
|
### Required Fields
|
||||||
|
|
||||||
- `model`: *string* - ID of the model to use. Refer to the model endpoint compatibility table for details on which models work with the Chat API.
|
- `model`: *string* - ID of the model to use. Refer to the model endpoint compatibility table for details on which models work with the Chat API.
|
||||||
|
|
||||||
- `messages`: *array* - A list of messages comprising the conversation so far.
|
- `messages`: *array* - A list of messages comprising the conversation so far.
|
||||||
|
|
||||||
|
#### Properties of `messages`
|
||||||
*Note* - Each message in the array contains the following properties:
|
*Note* - Each message in the array contains the following properties:
|
||||||
|
|
||||||
- `role`: *string* - The role of the message's author. Roles can be: system, user, assistant, or function.
|
- `role`: *string* - The role of the message's author. Roles can be: system, user, assistant, or function.
|
||||||
|
@ -25,7 +22,8 @@ In addition, liteLLM allows you to pass in the following **Optional** liteLLM ar
|
||||||
- `function_call`: *object (optional)* - The name and arguments of a function that should be called, as generated by the model.
|
- `function_call`: *object (optional)* - The name and arguments of a function that should be called, as generated by the model.
|
||||||
|
|
||||||
|
|
||||||
**Optional Fields**
|
|
||||||
|
### Optional Fields
|
||||||
|
|
||||||
- `functions`: *array* - A list of functions that the model may use to generate JSON inputs. Each function should have the following properties:
|
- `functions`: *array* - A list of functions that the model may use to generate JSON inputs. Each function should have the following properties:
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue