Unable to run MDXSearchTool without OpenAI API key

I am using my local Ollama server hosted in my premises. How can we use MDXSearchTool without using OPEN API KEY.

@rajuvs1974 OpenAI API key is needed because OpenAI’s models are used by default.

But you can customize the MDXSearchTool as follows:

tool = MDXSearchTool(
    config=dict(
        llm=dict(
            provider="ollama", # Options include google, openai, anthropic, llama2, etc.
            config=dict(
                model="llama2",
                # Optional parameters can be included here.
                # temperature=0.5,
                # top_p=1,
                # stream=true,
            ),
        ),
        embedder=dict(
            provider="google", # or openai, ollama, ...
            config=dict(
                model="models/embedding-001",
                task_type="retrieval_document",
                # Optional title for the embeddings can be added here.
                # title="Embeddings",
            ),
        ),
    )
)

See the official docs.