From ea0c65d146ae2dd5120800c87ae7b5bdaf453fb0 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Mon, 23 Oct 2023 15:22:41 -0700 Subject: [PATCH] (docs) add async embeddings --- docs/my-website/docs/embedding/async_embedding.md | 15 +++++++++++++++ docs/my-website/sidebars.js | 6 +++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/docs/my-website/docs/embedding/async_embedding.md b/docs/my-website/docs/embedding/async_embedding.md index e69de29bb..a78e99317 100644 --- a/docs/my-website/docs/embedding/async_embedding.md +++ b/docs/my-website/docs/embedding/async_embedding.md @@ -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) +``` \ No newline at end of file diff --git a/docs/my-website/sidebars.js b/docs/my-website/sidebars.js index d373b8e24..5b643cb17 100644 --- a/docs/my-website/sidebars.js +++ b/docs/my-website/sidebars.js @@ -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",