graphiti icon indicating copy to clipboard operation
graphiti copied to clipboard

Run the MCP-server with an Azure-OpenAI-configuration

Open ArneJanning opened this issue 7 months ago • 1 comments

When I try to run the MCP-server with an Azure-OpenAI-configuration I get this error:

Exception has occurred: ValidationError
2 validation errors for GraphitiClients
llm_client
  Input should be an instance of LLMClient [type=is_instance_of, input_value=<openai.lib.azure.AsyncAz...bject at 0x75f5f14e0ce0>, input_type=AsyncAzureOpenAI]
    For further information visit https://errors.pydantic.dev/2.11/v/is_instance_of
embedder
  Input should be an instance of EmbedderClient [type=is_instance_of, input_value=<openai.lib.azure.AsyncAz...bject at 0x75f5b875deb0>, input_type=AsyncAzureOpenAI]
    For further information visit https://errors.pydantic.dev/2.11/v/is_instance_of
  File "/home/arne/src/graphiti/graphiti_core/graphiti.py", line 159, in __init__
    driver=self.driver,

            llm_client=self.llm_client,

            embedder=self.embedder,

            cross_encoder=self.cross_encoder,

        )

It seems that the variable llm_client should be of type LLMClient (defined in client.py) when in fact it's of type openai.lib.azure.AsyncAzureOpenAI. The same happens with the embedder variable.

How to fix this?

ArneJanning avatar May 13 '25 09:05 ArneJanning

I've created a pull request that addresses this issue: #483

ArneJanning avatar May 13 '25 12:05 ArneJanning

Please see he MCP README for instructions on configuring for Azure.

danielchalef avatar Jun 25 '25 19:06 danielchalef