
    AHjZ                     J    d Z ddlmZmZ erddlmZ deded   fdZdefdZy	)
ze
RAG utility functions.

Provides provider configuration utilities similar to ProviderConfigManager.
    )TYPE_CHECKINGType)BaseRAGIngestioncustom_llm_providerreturnr   c           	          ddl m} ddlm} ddlm} |||d}|j                  |       }|(t        d|  dt        |j                                      |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)openaibedrock	vertex_aiz*RAG ingestion not supported for provider: z. Supported providers: )
+litellm.llms.vertex_ai.rag_engine.ingestionr	   'litellm.rag.ingestion.bedrock_ingestionr
   &litellm.rag.ingestion.openai_ingestionr   get
ValueErrorlistkeys)r   r	   r
   r   provider_mapingestion_classs         I/root/tools/cai/cai_env/lib/python3.12/site-packages/litellm/rag/utils.pyget_rag_ingestion_classr      sw     QKI %&)L #&&':;O89L8M N$$():):)<$=#>@
 	

     c                     | dk(  rddl m} |S y)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)0litellm.llms.vertex_ai.rag_engine.transformationr   )r   r   s     r   get_rag_transformation_classr   .   s     k)	
 )( r   N)	__doc__typingr   r   $litellm.rag.ingestion.base_ingestionr   strr   r    r   r   <module>r$      s;    'E >P9Q Bc r   