forked from phoenix/litellm-mirror
(docs) embedding: add api_base for HF
This commit is contained in:
parent
333e77d161
commit
6f8765125b
1 changed files with 11 additions and 0 deletions
|
@ -182,6 +182,17 @@ response = embedding(
|
|||
input=["good morning from litellm"]
|
||||
)
|
||||
```
|
||||
### Usage - Custom API Base
|
||||
```python
|
||||
from litellm import embedding
|
||||
import os
|
||||
os.environ['HUGGINGFACE_API_KEY'] = ""
|
||||
response = embedding(
|
||||
model='huggingface/microsoft/codebert-base',
|
||||
input=["good morning from litellm"],
|
||||
api_base = "https://p69xlsj6rpno5drq.us-east-1.aws.endpoints.huggingface.cloud"
|
||||
)
|
||||
```
|
||||
|
||||
| Model Name | Function Call | Required OS Variables |
|
||||
|-----------------------|--------------------------------------------------------------|-------------------------------------------------|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue