mirror of
https://github.com/tiennm99/litellm.git
synced 2026-08-20 22:24:01 +00:00
(docs) add async embeddings
This commit is contained in:
@@ -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",
|
||||
label: "Embedding() & Moderation()",
|
||||
items: ["embedding/supported_embedding", "embedding/moderation"],
|
||||
items: [
|
||||
"embedding/supported_embedding",
|
||||
"embedding/async_embedding",
|
||||
"embedding/moderation",
|
||||
],
|
||||
},
|
||||
{
|
||||
type: "category",
|
||||
|
||||
Reference in New Issue
Block a user