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 Assistants created with Azure OpenAI Assistants (Preview) (see below). Use this powerful, easy-to-setup low-code / no code playground tool to quickly experiment and build AI Assistants within your application with Azure OpenAI Assistants API.
[!IMPORTANT]
The Azure AI Assistant Tool is currently in Alpha. This early stage of development means the project is actively evolving, with significant updates and improvements expected. Users should anticipate changes as we work towards refining features, enhancing functionality, and expanding capabilities. We welcome feedback and contributions during this phase to help shape the future of the tool.
🌟Assistants, a new 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 Retrieval. 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:
💬 Inbuilt thread and memory management
📊 Advanced Data Analysis, create data visualizations and solving complex code and math problems with Code Interpreter
🚀 Build your own tools or call external tools and APIs with Function Calling
📚 Retrieval Augmented Generation with File Search tool (coming soon to Azure OpenAI Assistants)
🎤📢 Speech transcription and synthesis using Azure CognitiveServices Speech SDK
📤 Exporting the assistant configuration into simple CLI application
Learn more about Assistants on Azure OpenAI Service:
📹 Watch a short video about Azure OpenAI Assistants
📖 Read the launch announcement
📌 Get familiar with the Assistants API Quickstart
✔️ Enhance Developer Productivity: Streamline the assistant development process with Azure OpenAI Assistans through built-in middleware libraries and tools that making it easy to integrate AI capabilities into your copilot applications
✔️ Enable rapid prototyping: Create amazing demos with AOAI Assistants and develop end-to-end assistant solutions with a robust set of features, including built-in system functions, dynamic generation of user functions specification and implementation, assistant task creation and scheduling, and much more.
✔️Optimize your copilot development workflow: Get a reliable and scalable framework to test new Copilot use cases and dynamic AI applications with Assistants API without the need to build out manual tooling and configurations
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"
Windows:
setx AZURE_AI_SPEECH_KEY "Your Speech Key"
setx AZURE_AI_SPEECH_REGION "Your Speech Region"
Linux/Mac
export AZURE_AI_SPEECH_KEY="Your Speech Key"
export AZURE_AI_SPEECH_REGION="Your Speech Region"
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.