mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-22 00:31:44 +00:00
add asyncio QA checks
This commit is contained in:
parent
273b4b16e2
commit
a3d795be95
1 changed files with 5 additions and 3 deletions
|
|
@ -15,7 +15,6 @@ This implementation:
|
|||
|
||||
from __future__ import annotations
|
||||
|
||||
import asyncio
|
||||
import hashlib
|
||||
import uuid
|
||||
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple
|
||||
|
|
@ -407,10 +406,13 @@ class S3VectorsRAGIngestion(BaseRAGIngestion, BaseAWSLLM):
|
|||
f"Generating embeddings for {len(chunks)} chunks using {embedding_model}"
|
||||
)
|
||||
|
||||
# Convert to list to ensure type compatibility
|
||||
input_chunks: List[str] = list(chunks)
|
||||
|
||||
if self.router:
|
||||
response = await self.router.aembedding(model=embedding_model, input=chunks)
|
||||
response = await self.router.aembedding(model=embedding_model, input=input_chunks)
|
||||
else:
|
||||
response = await litellm.aembedding(model=embedding_model, input=chunks)
|
||||
response = await litellm.aembedding(model=embedding_model, input=input_chunks)
|
||||
|
||||
return [item["embedding"] for item in response.data]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue