Create Python ChatApp example for AI configuration#1065
Conversation
|
I've updated the description, this should be a console app, so Flask isn't needed. |
Co-authored-by: mrm9084 <1054559+mrm9084@users.noreply.github.com>
Co-authored-by: mrm9084 <1054559+mrm9084@users.noreply.github.com>
I've converted the app from a Flask web application to a console app similar to the .NET Core implementation. The changes include removing Flask dependencies, implementing a console-based interface with a continuous loop, and updating the documentation. All templates have been removed since they're not needed for a console app. See commit caf9cd0. |
Co-authored-by: mrm9084 <1054559+mrm9084@users.noreply.github.com>
Co-authored-by: mrm9084 <1054559+mrm9084@users.noreply.github.com>
Co-authored-by: zhenlan <10566826+zhenlan@users.noreply.github.com>
Co-authored-by: mrm9084 <1054559+mrm9084@users.noreply.github.com>
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a Python ChatApp sample that mirrors the .NET Core ChatApp sample, enabling chat interactions via both web and console interfaces.
- Implements a Flask-based application that integrates Azure App Configuration and Azure OpenAI.
- Defines model classes for messages and model configurations with dynamic configuration refresh support.
- Includes updated dependency declarations and comprehensive setup documentation.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| examples/Python/ChatApp/requirements.txt | Added necessary dependencies for Azure and OpenAI integration |
| examples/Python/ChatApp/models.py | Added data model classes for Message and ModelConfiguration |
| examples/Python/ChatApp/app.py | Implemented Flask app with configuration refresh and chat logic |
| examples/Python/ChatApp/README.md | Documented setup, usage instructions, and configuration details |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
zhenlan
left a comment
There was a problem hiding this comment.
Please clean up the redundant code generated by Copilot and make sure the code can run.
This PR adds a Python ChatApp example that mirrors the functionality of the .NET Core ChatApp sample for AI configuration.
Key Features
azure-appconfiguration-providerfor configuration managementImplementation Details
MessageandModelConfigurationclassesFiles Added
app.py- Main Flask application with Azure OpenAI integrationmodels.py- Contains data model classes for Message and ModelConfigurationrequirements.txt- Dependencies with latest stable versionsREADME.md- Setup and usage documentationtemplates/- HTML templates for the web interfaceFixes #1064.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.