o
    ưi[                     @   sL   d Z ddlmZmZ erddlmZ deded fddZdefd	d
ZdS )ze
RAG utility functions.

Provides provider configuration utilities similar to ProviderConfigManager.
    )TYPE_CHECKINGType)BaseRAGIngestioncustom_llm_providerreturnr   c                 C   sb   ddl m} ddlm} ddlm} |||d}|| }|du r/td|  dt|	  |S )	a%  
    Get the appropriate RAG ingestion class for a provider.

    Args:
        custom_llm_provider: The LLM provider name (e.g., "openai", "bedrock", "vertex_ai")

    Returns:
        The ingestion class for the provider

    Raises:
        ValueError: If the provider is not supported
    r   )VertexAIRAGIngestion)BedrockRAGIngestion)OpenAIRAGIngestion)ZopenaiZbedrock	vertex_aiNz*RAG ingestion not supported for provider: z. Supported providers: )
Z+litellm.llms.vertex_ai.rag_engine.ingestionr   Z'litellm.rag.ingestion.bedrock_ingestionr   Z&litellm.rag.ingestion.openai_ingestionr	   get
ValueErrorlistkeys)r   r   r   r	   Zprovider_mapZingestion_class r   H/home/app/Keep/.python/lib/python3.10/site-packages/litellm/rag/utils.pyget_rag_ingestion_class   s   

r   c                 C   s   | dkrddl m} |S dS )z
    Get the appropriate RAG transformation class for a provider.

    Args:
        custom_llm_provider: The LLM provider name

    Returns:
        The transformation class for the provider, or None if not needed
    r
   r   )VertexAIRAGTransformationN)Z0litellm.llms.vertex_ai.rag_engine.transformationr   )r   r   r   r   r   get_rag_transformation_class.   s   
r   N)	__doc__typingr   r   Z$litellm.rag.ingestion.base_ingestionr   strr   r   r   r   r   r   <module>   s    !