mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-09 22:31:41 +00:00
(docs) embedding models
This commit is contained in:
parent
e7735274de
commit
3239ec80c9
1 changed files with 27 additions and 1 deletions
|
|
@ -8,6 +8,33 @@ os.environ['OPENAI_API_KEY'] = ""
|
|||
response = embedding('text-embedding-ada-002', input=["good morning from litellm"])
|
||||
```
|
||||
|
||||
### Expected Output from litellm.embedding()
|
||||
|
||||
```json
|
||||
{
|
||||
"object": "list",
|
||||
"data": [
|
||||
{
|
||||
"object": "embedding",
|
||||
"index": 0,
|
||||
"embedding": [
|
||||
-0.0022326677571982145,
|
||||
0.010749882087111473,
|
||||
...
|
||||
...
|
||||
...
|
||||
|
||||
]
|
||||
}
|
||||
],
|
||||
"model": "text-embedding-ada-002-v2",
|
||||
"usage": {
|
||||
"prompt_tokens": 10,
|
||||
"total_tokens": 10
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## OpenAI Embedding Models
|
||||
|
||||
### Usage
|
||||
|
|
@ -123,4 +150,3 @@ response = embedding(
|
|||
| microsoft/codebert-base | `embedding('huggingface/microsoft/codebert-base', input=input)` | `os.environ['HUGGINGFACE_API_KEY']` |
|
||||
| BAAI/bge-large-zh | `embedding('huggingface/BAAI/bge-large-zh', input=input)` | `os.environ['HUGGINGFACE_API_KEY']` |
|
||||
| any-hf-embedding-model | `embedding('huggingface/hf-embedding-model', input=input)` | `os.environ['HUGGINGFACE_API_KEY']` |
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue