OpenAI at Scale
OpenAI at Scale is a workshop initiative by the FastTrack for Azure team at Microsoft. It guides users on how to construct and deploy a straightforward ChatGPT user interface application using Azure. This initiative transforms the complex process of application development into a more manageable task, ensuring users have a seamless experience in integrating AI into their environment.
🎯 Features
The project encompasses several key features, designed to enhance user interaction and system efficiency:
- Chat UI: Provides a user-friendly interface for engaging with the AI.
- Configuration: Allows customization of system prompts and hyperparameters to tailor AI responses.
- Authentication: Integrates with Azure Active Directory to authenticate users and retrieve data from Microsoft Graph.
- Logging: Uses Azure Log Analytics to gather application logs, aiding in monitoring and debugging.
- Data Storage: Enables logging of prompt data into Azure Cosmos DB for record-keeping and analysis.
🚀 Getting Started
Let's delve into how users can get this project up and running.
⚒️ Prerequisites
To operate this project locally, ensure the following:
- Operating System: Compatible with Windows 11, MacOS, or Linux. Windows users should use Ubuntu 20.04 LTS via Windows Subsystem for Linux.
- Development Tools: Install the latest versions of Azure CLI, Node.js, Python, and any Docker environment for app containment.
- Version Control: A git client for source code management.
For deployment on Azure, you will require:
- An active Azure subscription with certain resources like Azure OpenAI Service and Azure Active Directory application. Additionally, Azure Log Analytics and possibly Azure Cosmos DB may be needed for full functionality.
- Appropriate permissions to create the required resources on Azure.
Project Setup
-
Creating Azure OpenAI Service: Users are encouraged to utilize the Azure Portal for this, particularly if they're not familiar with the Azure CLI. The service needs to be correctly set up to facilitate AI operations.
-
Azure Active Directory Application: The app should be registered for single-page application use during local development, with specific redirections set for testing purposes.
-
Optional - Azure Cosmos DB: Users can opt to establish a Cosmos DB for logging data. This is helpful for data management purposes.
-
Deployment to Local Environment:
- Set necessary environment variables, typically defined within a
.env
file. - Prepare the Python environment for running the backend services.
- Configure the Node.js environment for the frontend application, ensuring the correct setup for either development or production environments.
- Set necessary environment variables, typically defined within a
-
Deploying to Azure: A structured deployment process allows the application to be live on Azure. Special attention must be given to the configuration and management of resources like Azure App Service.
-
Configuration for Logging: Setting up Azure Log Analytics is vital for collecting logs, ensuring the application runs smoothly and issues can be diagnosed promptly.
Additional Notes
Users can store chat logs in Azure Cosmos DB for subsequent analysis. Detailed instructions are available on how to log chat messages, which can then drive insights for improvements or future projects.
🤝 Contributing
OpenAI at Scale warmly welcomes contributions from both the customer and Microsoft internal teams. Community members can enhance the overall quality and capability of the project by adding their expertise and innovations.
This project showcases Azure's capabilities in integrating AI into enterprise applications, providing users with robust, scalable solutions for modern software needs.
By engaging with the OpenAI at Scale initiative, users are better equipped to leverage AI technologies in their own applications, ensuring they are at the forefront of technological advancements.