The Azure AI Assistant Tool is experimental Python application and middleware designed to simplify the development, experimentation, testing, and debugging of OpenAI assistants.
Azure AI Assistants tool is an experimental Python application and middleware designed to simplify the development, experimentation, testing, and debugging of AI agents created with Azure OpenAI Assistants, Chat Completion and/or Realtime API based technologies. Use this powerful, easy-to-setup low-code playground tool to quickly experiment and build AI agents within your application.
[!IMPORTANT]
The Azure AI Assistant Tool is experimental, created to support your product ideation and experimentation using AI agents. As the tool evolves, expect significant updates and improvements. We welcome feedback and contributions to help shape its future.
🌟Assistants, API from Azure OpenAI Service, is a stateful evolution of the Chat Completions API. Assistants makes it easier for developers to create applications with sophisticated copilot-like experiences in their applications and enable developer access to powerful tools like Code Interpreter and File Search. Assistants is built on the same capabilities that power OpenAI’s GPT product and offers unparalleled flexibility for creating a wide range of copilot-like applications. Copilots created with Assistants can sift through data, suggest solutions, and automate tasks and use cases span a wide range: AI-powered product recommender, sales analyst app, coding assistant, employee Q&A chatbot, and more.
Features include:
Learn more about Assistants on Azure OpenAI Service:
Enable Rapid AI Agent Prototyping: Rapidly create AI agent prototypes using OpenAI’s technologies, Assistants, Chat Completion, and Realtime APIs. This includes user-friendly configurability of different agents, built-in system functions, specific tool configurations, and LLM configurations.
Enhance Developer Productivity: Streamline the agent development process through built-in middleware libraries and tools, utilizing tools in prompt engineering to automate your coding tasks and integrate AI capabilities into your copilot applications more effectively.
This section covers the Realtime capabilities for AI agent prototyping with OpenAI’s Realtime APIs, focusing on speech and text input/output through real-time WebSocket communication.
Please note that these capabilities are offered as an experimental feature. They are intended primarily for exploration, demos, or proof-of-concept usage.
We do not recommend using these features in production or business-critical applications until further notice.
Computer
to trigger the conversation.
Check out the demo video to see the OpenAI Realtime Support in action!
https://github.com/user-attachments/assets/b0c80b34-b825-4442-a80c-93f314909a92
The Azure AI Assistant tool requires Python >= 3.8 on your system. You can download Python from the official website.
Latest stable Python version is recommended.
Create a new Python virtual environment. Virtual environment is recommended for safe install the SDK packages:
python3 -m venv .venv
source .venv/bin/activate
py -3 -m venv .venv
.venv\scripts\activate
Run the following command in your terminal to install all the necessary dependencies as specified in the requirements.txt file.
pip install -r requirements.txt
We have included the azure.ai.assistant
library currently within this repository as part of the alpha status of the project.
The plan is to release library on PyPI for more convenience installation in future.
Build the wheel for azure.ai.assistant
library using the following instructions, or use the wheel package provided under the repo’s release tags directly.
pip install wheel
and pip install setuptools
sdk/azure-ai-assistant
folderpython setup.py sdist bdist_wheel
dist
folderpip install --force-reinstall azure_ai_assistant-0.x.xa1-py3-none-any.whl
To successfully make a call against the Azure OpenAI service, you’ll need the following:
- ENDPOINT: This value can be found in the Keys and Endpoint section when examining your resource from the Azure portal. Alternatively, you can find the value in Azure OpenAI Studio > Playground > View code. An example endpoint is: https://docs-test-001.openai.azure.com/.
- API-KEY: This value can be found in the Keys and Endpoint section when examining your resource from the Azure portal. You can use either KEY1 or KEY2.
- MODEL DEPLOYMENT-NAME: This value will correspond to the custom name you chose for your deployment when you deployed a model. This value can be found under Resource Management > Model Deployments in the Azure portal or alternatively under Management > Deployments in Azure OpenAI Studio.
Next, go to your resource in the Azure portal. The Keys and Endpoint can be found in the Resource Management section (see image below). Copy your endpoint and access key as you’ll need both for authenticating your API calls. You can use either KEY1 or KEY2. Always having two keys allows you to securely rotate and regenerate keys without causing a service disruption.
Create and assign persistent environment variables for your key and endpoint.
2024-05-01-preview
for assistants.Windows:
Use setx or set command depending on your preference.
setx AZURE_OPENAI_API_KEY "Your Azure OpenAI Key"
setx AZURE_OPENAI_ENDPOINT "Your OpenAI Endpoint"
setx AZURE_OPENAI_API_VERSION "Azure OpenAI version"
setx OPENAI_API_KEY "Your OpenAI Key"
Linux/Mac
export AZURE_OPENAI_API_KEY="Your Azure OpenAI Key"
export AZURE_OPENAI_ENDPOINT="Your OpenAI Endpoint"
export AZURE_OPENAI_API_VERSION="Azure OpenAI version"
export OPENAI_API_KEY="Your OpenAI Key"
In the root of this repository, command:
python main.py
This command will start the Azure AI Assistant Tool and you can interact with it through its user interface which looks something like this:
The Azure AI Assistant Tool is licensed under the MIT License. See the LICENSE file for more details.
The Azure AI Assistant Tool uses PySide6, which is licensed under the GNU Lesser General Public License (LGPL).
By using PySide6, you are able to modify and redistribute the library under the same license.
For more information on PySide6’s license, please visit Qt Licensing.
We welcome contributions and suggestions! Please see the contributing guidelines for details.
This project has adopted the Microsoft Open Source Code of Conduct. Please see the code of conduct for details.
If you find a bug in the source code or a mistake in the documentation, feel free to submit bug report.
Or even better you could submit a pull request with a fix.
If there’s an feature that you’d like to see added, feel free to file a Feature Request.
If you’d like to implement it yourself, please refer to our contributing guidelines.