Learn how to chat directly with deployed Microsoft Foundry models using Python in Visual Studio Code.
Try it yourself in Microsoft Foundry: ai.azure.com
- A Microsoft Foundry project
- Navigate to the folder:
cd Samples/Chat-With_Model - Install dependencies:
- pip install azure-ai-projects --pre
- pip install openai azure-identity python-dotenv
- Use the Azure CLI command
az loginoraz login --use-device-codeto authenticate. - Set up environment variables:
copy .env.example .env - Run the script:
python chat-with-model.py