-
Notifications
You must be signed in to change notification settings - Fork 98
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"
# Modified Flash agent to run a single scenario for testing | ||
|
||
import asyncio | ||
import logging |
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.
The 'logging' import is unused in this script; consider removing it to keep the test file clean.
import logging |
Copilot uses AI. Check for mistakes.
Write-Host "`n1. Checking Python installation..." -ForegroundColor Yellow | ||
try { | ||
$pythonVersion = python --version 2>&1 | ||
if ($pythonVersion -match "Python 3\.1[1-9]") { |
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 regex only matches Python 3.11–3.19, so newer 3.1x versions (e.g., 3.20+) will be rejected; update it to allow all 3.11+ versions.
if ($pythonVersion -match "Python 3\.1[1-9]") { | |
if ($pythonVersion -match "Python 3\.1\d+") { |
Copilot uses AI. Check for mistakes.
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.
This pull request introduces significant updates to the AIOpsLab project, focusing on documentation enhancements, Azure OpenAI integration, and code modifications to support new features. The changes aim to improve usability, streamline setup processes, and expand compatibility with Azure OpenAI services.
Documentation Updates:
.github/copilot-instructions.md
: Added detailed project instructions, including context, code style guidelines, key components, and development notes for AIOpsLab.HOW_TO_RUN.md
: Comprehensive guide for setting up and running the project, including Python installation, Poetry configuration, environment setup, and troubleshooting steps.SETUP.md
: Simplified setup guide for installing prerequisites, configuring Poetry, and integrating with VS Code for development.Azure OpenAI Integration:
README.md
: Documented the steps required to integrate AIOpsLab with Azure OpenAI, including environment variable setup, code modifications, and troubleshooting common issues.aiopslab/orchestrator/evaluators/qualitative.py
: Updated the evaluation system to support Azure OpenAI, including environment variable checks, client initialization, and dynamic model name handling.These updates enhance the project's accessibility, provide clear instructions for contributors, and expand its capabilities to support Azure OpenAI services.