-
Notifications
You must be signed in to change notification settings - Fork 136
Azure OpenAI integration #44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Added complete setup steps from cluster creation to agent execution - Documented all code modifications made for Azure OpenAI support - Included troubleshooting guide for common issues (storage, auth, env vars) - Added verification commands and security best practices - Provided step-by-step solutions for Windows/PowerShell users - Enhanced documentation for reproducible deployments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR enhances AIOpsLab with Azure OpenAI support, updated documentation, and new setup/testing utilities.
- Integrate Azure OpenAI client detection and dynamic model naming in LLM utilities and evaluators
- Expand documentation (
README.md, setup guides, Copilot instructions) to cover Azure OpenAI configuration and environment variables - Add test scripts and helper files: powershell quick setup, Azure connectivity test, single-scenario Flash test, and Kubernetes storage-class fixes
Reviewed Changes
Copilot reviewed 14 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| clients/utils/llm.py | Added AzureOpenAI detection, initialization, and model mapping |
| aiopslab/orchestrator/evaluators/qualitative.py | Extended qualitative evaluator with Azure OpenAI support |
| README.md | Documented Azure OpenAI integration steps and environment setup |
| test_azure_openai.py | New script to validate Azure OpenAI configuration and API calls |
| quick-setup.ps1 | Windows PowerShell script to automate project setup |
| fix-storage-classes.yaml | Kubernetes storage classes needed for MongoDB PVC provisioning |
| SETUP.md | Updated Windows and project setup instructions |
Comments suppressed due to low confidence (3)
README.md:115
- The code references AZURE_OPENAI_ENDPOINT for the Azure endpoint, but this line uses OPENAI_API_BASE—update the docs to consistently use AZURE_OPENAI_ENDPOINT or explain both variables.
OPENAI_API_BASE="https://your-resource-name.openai.azure.com/"
SETUP.md:80
- This references
TutorialSetup.md, which doesn't exist in the repo. Either add the file or remove/update this reference to avoid confusion.
4. Check `TutorialSetup.md` for additional setup instructions
clients/utils/llm.py:73
- The indentation of 'model_name' under the else branch is incorrect—it should align with the 'client' assignment so the fallback model is set properly when not using Azure.
model_name = "gpt-4-turbo-2024-04-09"
HacksonClark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR looks good, however I don't like committing binary files to GitHub. I'd prefer some setup instructions as it seems like it contains some binaries for running on windows. It would make more sense to me to have some windows setup instructions.
README.md
Outdated
| - `your-resource-name`: Your Azure OpenAI resource name | ||
| - `gpt-4`: Your actual deployment name from Azure OpenAI Studio | ||
|
|
||
| ### Required Code Modifications |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this section be moved to the description of the PR rather than the read me as these changes would be part of the repo once merged and the users need not repeat these steps?
README.md
Outdated
| - Set `k8s_user: <your-username>` | ||
| - Set `qualitative_eval: true` (to enable Azure OpenAI evaluation) | ||
|
|
||
| ### 🔧 Key Code Modifications Made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this list! I think moving this section to the PR description would help understand the changes in the PR.
| @@ -0,0 +1,81 @@ | |||
| # AIOpsLab Setup Guide | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this file should be referenced from the README.md file. How about adding a "For specific instructions, please check out this page ' under README.md#Installation?
| @@ -0,0 +1,315 @@ | |||
| # Custom AIOps Agents for AIOpsLab | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is excellent, thanks! Can you please add a reference to this page under the README.md#Usage section?
clients/README_AGENTS.md
Outdated
| - Optimize API usage | ||
| - Check resource constraints | ||
|
|
||
| ### Getting Help |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove Getting Help, Contribution, and License sections as these are part of README.md? Any specific reasons for adding these here?
| @@ -0,0 +1,43 @@ | |||
| import os | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you! Can the test files be moved to tests/clients folder?
| @@ -0,0 +1,32 @@ | |||
| #!/usr/bin/env python3 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please explain the goal of this script? Was it checked in accidentally?
| @@ -0,0 +1,47 @@ | |||
| apiVersion: storage.k8s.io/v1 | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this fix! Can you please move this to a folder title AIOpsLab/troubleshooting, and update the references in the Troubleshooting sections? We will look into it and update the application manifest files to resolve this issue
|
Hi @lostein85, thanks a lot for pushing these changes! They add many useful features and improve the usability of the framework. |
HacksonClark
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please address all comments and don't commit the binary files.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you delete a section in .gitignore? Maybe a better idea to keep them
This pull request introduces extensive improvements to project documentation and enhances agent development guidance for the AIOpsLab framework. Key updates include new and expanded setup guides, clearer instructions for running and troubleshooting the project, improved support for Azure OpenAI integration, and a comprehensive agent development reference. These changes make it easier for new contributors and users to get started, run, and extend the AIOpsLab project.
Documentation & Setup Improvements:
.github/copilot-instructions.mdto provide workspace-specific instructions for Copilot, including code style, project structure, and development notes.HOW_TO_RUN.mdandSETUP.mdwith detailed step-by-step installation, configuration, troubleshooting, and usage instructions for Windows environments and Poetry. [1] [2]README.mdto clarify installation requirements, remove outdated W&B instructions, and direct users to the new agent documentation. [1] [2]Agent Development & Usage:
clients/README_AGENTS.md, a comprehensive guide to developing, customizing, and testing AIOps agents, including architecture, API usage, and best practices.Cloud Integration:
aiopslab/orchestrator/evaluators/qualitative.py, allowing dynamic selection of API type and model based on environment variables.These changes collectively enhance onboarding, developer experience, and extensibility for the AIOpsLab framework.