def initialize_config(openai_key: str, anthropic_key: str, cohere_key: str, db_url: str) -> RAGLiteConfig:
    """Initializes and returns a RAGLiteConfig object with the specified API keys and database URL.

    This function sets the provided API keys in the environment variables and returns a 
    RAGLiteConfig object configured with the given database URL and pre-defined settings for 
    language model, embedder, and reranker.

    Args:
        openai_key (str): The API key for OpenAI services.
        anthropic_key (str): The API key for Anthropic services.
        cohere_key (str): The API key for Cohere services.
        db_url (str): The database URL for connecting to the desired data source.

    Returns:
        RAGLiteConfig: A configuration object initialized with the specified parameters.

    Raises:
        ValueError: If there is an issue setting up the configuration, an error is raised with details."""
    try:
        os.environ["OPENAI_API_KEY"] = openai_key
        os.environ["ANTHROPIC_API_KEY"] = anthropic_key
        os.environ["COHERE_API_KEY"] = cohere_key
        
        return RAGLiteConfig(
            db_url=db_url,
            llm="claude-3-opus-20240229",
            embedder="text-embedding-3-large",
            embedder_normalize=True,
            chunk_max_size=2000,
            embedder_sentence_window_size=2,
            reranker=Reranker("cohere", api_key=cohere_key, lang="en")
        )
    except Exception as e:
        raise ValueError(f"Configuration error: {e}")
Initializes and returns a RAGLiteConfig object with the specified API keys and database URL.

    This function sets the provided API keys in the environment variables and returns a 
    RAGLiteConfig object configured with the given database URL and pre-defined settings for 
    language model, embedder, and reranker.

    Args:
        openai_key (str): The API key for OpenAI services.
        anthropic_key (str): The API key for Anthropic services.
        cohere_key (str): The API key for Cohere services.
        db_url (str): The database URL for connecting to the desired data source.

    Returns:
        RAGLiteConfig: A configuration object initialized with the specified parameters.

    Raises:
        ValueError: If there is an issue setting up the configuration, an error is raised with details.
rag_tutorials/hybrid_search_rag/main.py