forked from phoenix/litellm-mirror
(docs) add async embeddings
This commit is contained in:
parent
5516113f18
commit
ea0c65d146
2 changed files with 20 additions and 1 deletions
|
@ -0,0 +1,15 @@
|
||||||
|
# Async Embedding
|
||||||
|
|
||||||
|
LiteLLM provides an asynchronous version of the `embedding` function called `aembedding`
|
||||||
|
### Usage
|
||||||
|
```python
|
||||||
|
from litellm import aembedding
|
||||||
|
import asyncio
|
||||||
|
|
||||||
|
async def test_get_response():
|
||||||
|
response = await aembedding('text-embedding-ada-002', input=["good morning from litellm"])
|
||||||
|
return response
|
||||||
|
|
||||||
|
response = asyncio.run(test_get_response())
|
||||||
|
print(response)
|
||||||
|
```
|
|
@ -46,7 +46,11 @@ const sidebars = {
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
label: "Embedding() & Moderation()",
|
label: "Embedding() & Moderation()",
|
||||||
items: ["embedding/supported_embedding", "embedding/moderation"],
|
items: [
|
||||||
|
"embedding/supported_embedding",
|
||||||
|
"embedding/async_embedding",
|
||||||
|
"embedding/moderation",
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: "category",
|
type: "category",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue