open-notebook/api/embedding_service.py
Luis Novo d7b0fff954
Api podcast migration (#93)
Creates the API layer for Open Notebook
Creates a services API gateway for the Streamlit front-end
Migrates the SurrealDB SDK to the official one
Change all database calls to async
New podcast framework supporting multiple speaker configurations
Implement the surreal-commands library for async processing
Improve docker image and docker-compose configurations
2025-07-17 08:36:11 -03:00

25 lines
No EOL
600 B
Python

"""
Embedding service layer using API.
"""
from typing import Dict
from loguru import logger
from api.client import api_client
class EmbeddingService:
"""Service layer for embedding operations using API."""
def __init__(self):
logger.info("Using API for embedding operations")
def embed_content(self, item_id: str, item_type: str) -> Dict[str, str]:
"""Embed content for vector search."""
result = api_client.embed_content(item_id=item_id, item_type=item_type)
return result
# Global service instance
embedding_service = EmbeddingService()