File size: 611 Bytes
f813ba1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"""Shared FastAPI dependencies for dependency injection."""

from __future__ import annotations

from app.core.generation.llm_client import LLMClient, get_llm_client
from app.core.retrieval.vector_store import VectorStore, get_vector_store


async def get_vs() -> VectorStore:
    """Dependency that provides the VectorStore singleton.

    Returns:
        The shared VectorStore instance.
    """
    return get_vector_store()


async def get_llm() -> LLMClient:
    """Dependency that provides the LLMClient singleton.

    Returns:
        The shared LLMClient instance.
    """
    return get_llm_client()