Hi,
I have been trying to use the Mistral Small that I have deployed on Azure AI foundry. So I wanted to try to call it with a simple python script :
import os
from azure.ai.inference import ChatCompletionsClient
from azure.core.credentials import AzureKeyCredential
from azure.ai.inference.models import SystemMessage, UserMessage
from src.utils import load_api_keys
if __name__ == "__main__":
load_api_keys()
endpoint_url = os.environ["AZUREAI_ENDPOINT_URL"]
endpoint_key = os.environ["AZUREAI_ENDPOINT_KEY"]
print(f"Endpoint URL : {endpoint_url}")
print(f"Endpoint KEY : {endpoint_key}")
client = ChatCompletionsClient(
endpoint=endpoint_url,
credential=AzureKeyCredential(endpoint_key),
)
print(f"Created client of type `{type(client).__name__}
Unfortunately, I have the error :
I have the error, while using the URL & Key given on the second joint picture:
![enter image description here](https://learn-attachment.microsoft.com/api/attachments/ed693737-10df-4941-8c35-489a96976d77?platform=QnA)
If you have any clues on what I have done wrong you're more than welcome to share your opinion !
Thanks !