mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-24 18:24:20 +00:00
docs
This commit is contained in:
parent
353e2ce49b
commit
cc4be8dd73
1 changed files with 10 additions and 9 deletions
|
@ -16,15 +16,16 @@ For calls to your custom API base ensure:
|
|||
|
||||
### Example Call to Custom LLM API using LiteLLM
|
||||
```python
|
||||
response = completion(
|
||||
model="custom/meta-llama/Llama-2-13b-hf",
|
||||
messages= [{"content": "what is custom llama?", "role": "user"}],
|
||||
temperature=0.2,
|
||||
max_tokens=10,
|
||||
api_base="https://api.autoai.dev/inference",
|
||||
request_timeout=300,
|
||||
)
|
||||
print("got response\n", response)
|
||||
from litellm import completion
|
||||
response = completion(
|
||||
model="custom/meta-llama/Llama-2-13b-hf",
|
||||
messages= [{"content": "what is custom llama?", "role": "user"}],
|
||||
temperature=0.2,
|
||||
max_tokens=10,
|
||||
api_base="https://api.autoai.dev/inference",
|
||||
request_timeout=300,
|
||||
)
|
||||
print("got response\n", response)
|
||||
```
|
||||
|
||||
#### Setting your Custom API endpoint
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue