Files
Home_assistant/backend/app/rag/embeddings.py
T
2026-06-16 09:59:39 +03:00

14 lines
304 B
Python

from __future__ import annotations
from app.llm.client import LLMClient
async def embed_texts(texts: list[str]) -> list[list[float]]:
if not texts:
return []
client = LLMClient()
try:
return await client.embed(texts)
finally:
await client.aclose()