{"id":19100436,"url":"https://github.com/Azure-Samples/azureai-assistant-tool","last_synced_at":"2025-04-18T17:33:39.870Z","repository":{"id":225068422,"uuid":"758326937","full_name":"Azure-Samples/azureai-assistant-tool","owner":"Azure-Samples","description":"The Azure AI Assistant Tool is experimental Python application and middleware designed to simplify the development, experimentation, testing, and debugging of OpenAI assistants.","archived":false,"fork":false,"pushed_at":"2024-05-22T23:46:21.000Z","size":3112,"stargazers_count":75,"open_issues_count":7,"forks_count":23,"subscribers_count":15,"default_branch":"main","last_synced_at":"2024-05-23T01:09:46.794Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Azure-Samples.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-02-16T04:26:35.000Z","updated_at":"2024-06-10T19:00:29.573Z","dependencies_parsed_at":"2024-03-26T23:32:14.739Z","dependency_job_id":"33169d8d-51b9-4e5f-b0bf-08787e5c74b6","html_url":"https://github.com/Azure-Samples/azureai-assistant-tool","commit_stats":null,"previous_names":["azure-samples/azureai-assistant-tool"],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2Fazureai-assistant-tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2Fazureai-assistant-tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2Fazureai-assistant-tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Azure-Samples%2Fazureai-assistant-tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Azure-Samples","download_url":"https://codeload.github.com/Azure-Samples/azureai-assistant-tool/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783096,"owners_count":17201904,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:52:50.403Z","updated_at":"2024-11-09T03:54:10.561Z","avatar_url":"https://github.com/Azure-Samples.png","language":"Python","funding_links":[],"categories":["others"],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e 🤖🛠️Azure AI Assistants Tool \u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\u0026ensp;\n![Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)\u0026ensp;\n![CrossPlatform](https://img.shields.io/badge/cross-platform-blue)\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n⚡Develop stateful copilot applications powered by Azure OpenAI Assistants at lightning speed⚡\n\u003c/div\u003e\n\u003cbr\u003e\n\n  **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.\n\n\u003e [!IMPORTANT]\n\u003e **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.\n\n\n## 🧱 What is Assistants from Azure OpenAI service?\n\n🌟**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\u0026A chatbot, and more.\n\n**Features** include:\n\n💬 Inbuilt thread and memory management \u003cbr\u003e\n📊 Advanced Data Analysis, create data visualizations and solving complex code and math problems with **Code Interpreter**\u003cbr\u003e\n🚀 Build your own tools or call external tools and APIs with **Function Calling**\u003cbr\u003e\n📚 Retrieval Augmented Generation with **File Search** tool (coming soon to Azure OpenAI Assistants)\u003cbr\u003e\n🎤📢 Speech transcription and synthesis using Azure CognitiveServices Speech SDK\u003cbr\u003e\n📤 Exporting the assistant configuration into simple CLI application\n\n**Learn more** about Assistants on Azure OpenAI Service:\n\n  📹 Watch a [short video](https://www.youtube.com/watch?v=CMXtAe5DhXc\u0026embeds_referring_euri=https%3A%2F%2Ftechcommunity.microsoft.com%2F\u0026source_ve_path=OTY3MTQ\u0026feature=emb_imp_woyt) about Azure OpenAI Assistants\n  📖 Read the [launch announcement](https://techcommunity.microsoft.com/t5/ai-azure-ai-services-blog/azure-openai-service-announces-assistants-api-new-models-for/ba-p/4049940)\n  📌 Get familiar with the [Assistants API Quickstart](https://learn.microsoft.com/en-us/azure/ai-services/openai/how-to/assistant)\n\n\n## 🚀 How does this Tool help?\n\n✔️ **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\n\n✔️ **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. \n\n✔️**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\n\n\n\n## 💥 Highlights\n\n- **Easy Configuration**: Set up your assistant with the model, custom instructions, files, and tools\n- **Tool Integration**: Incorporate knowledge retrieval, code interpreters, and built-in system and dynamic user functions to enhance assistant skills and capabilities.\n- **Dynamic User Functions**: Quickly create and apply user-defined functions to assistants.\n- **Task Management**: Efficiently manage and schedule tasks, including batch and multi-step operations, for parallel execution.\n\n\n## ✨ Quick Start\n\n### Step 1: Complete Azure prerequisities\n\n- Create an Azure Subscription for [free](https://azure.microsoft.com/en-us/free/ai-services/), if you don't have one already\n- [Apply for access](https://aka.ms/oai/access) to Azure OpenAI Service in this Azure Subscription. Azure OpenAI Service is currently a limited access service so access is granted through an application process. Most applications are processed within a day of applying.\n- Azure OpenAI Assistants is currently available in Sweden Central, East US 2, and Australia East. We are expanding our models and regional availability - see the [models guide](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models) for the latest model and regional availability for Assistants.\n- Create an Azure OpenAI resource on [Azure Portal](https://ms.portal.azure.com) with one of the Assistants supported models from the models guide page deployed in that region\n\n### Step 2: Install Python\n\nThe Azure AI Assistant tool requires Python \u003e= 3.8 on your system. You can download Python from [the official website](https://www.python.org/downloads/).\nLatest stable Python version is recommended.\n\nCreate a new Python virtual environment. Virtual environment is recommended for safe install the SDK packages:\n * On MacOS and Linux run:\n   ```\n   python3 -m venv .venv\n   source .venv/bin/activate\n   ```\n* On Windows run:\n   ```\n   py -3 -m venv .venv\n   .venv\\scripts\\activate\n   ```\n\n### Step 3: Install the tool and dependencies\n\nRun the following command in your terminal to install all the necessary dependencies as specified in the requirements.txt file.\n\n```\npip install -r requirements.txt\n```\n\n### Step 4: Build and install azure.ai.assistant Python library (Optional)\n\nWe have included the `azure.ai.assistant` library currently within this repository as part of the alpha status of the project. \nThe plan is to release library on PyPI for more convenience installation in future.\n\nBuild the wheel for `azure.ai.assistant` library using the following instructions, or use the wheel package provided under the repo's release tags directly.\n\n- Python wheel and setuptools packages are required to build the library package. You can install them using the commands: `pip install wheel`and `pip install setuptools`\n- Go to the`sdk/azure-ai-assistant` folder\n- Build the wheel using following command: `python setup.py sdist bdist_wheel`\n- Go to generated `dist` folder\n- Install the generated wheel using following command: `pip install --force-reinstall azure_ai_assistant-0.x.xa1-py3-none-any.whl`\n  - This installation will pick the necessary dependencies for the library (openai, python-Levenshtein, fuzzywuzzy, Pillow, requests)\n\n\n### Step 5: Find and copy your Azure OpenAI Service APIkey, endpoint and model deployment version\n\nTo successfully make a call against the Azure OpenAI service, you'll need the following:\n\n**- ENDPOINT:**\tThis 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 \u003e Playground \u003e View code. An example endpoint is: https://docs-test-001.openai.azure.com/.\n\n**- API-KEY:**\tThis 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.\n\n**- MODEL DEPLOYMENT-NAME:**\tThis 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 \u003e Model Deployments in the Azure portal or alternatively under Management \u003e Deployments in Azure OpenAI Studio.\n\nNext, go to your resource in the [Azure portal](https://ms.portal.azure.com/#home). 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.\n![portal keys and endpoint](https://github.com/Azure-Samples/azureai-assistant-tool/assets/118226126/b4ddbbba-1b91-4525-b05d-b9673dd6e143)\n\n### Step 6: Setup Environment Variables\n\nCreate and assign persistent environment variables for your key and endpoint.\n\n#### ⌨️ Command Line (CLI)\n\n1. Set the Azure OpenAI Service key, endpoint. Version is optional and default currently is `2024-05-01-preview` for assistants.\n\n**Windows:**\nUse setx or set command depending on your preference.\n\n```\nsetx AZURE_OPENAI_API_KEY \"Your Azure OpenAI Key\"\nsetx AZURE_OPENAI_ENDPOINT \"Your OpenAI Endpoint\"\nsetx AZURE_OPENAI_API_VERSION \"Azure OpenAI version\"\nsetx OPENAI_API_KEY \"Your OpenAI Key\"\n```\n\n**Linux/Mac**\n```\nexport AZURE_OPENAI_API_KEY=\"Your Azure OpenAI Key\"\nexport AZURE_OPENAI_ENDPOINT=\"Your OpenAI Endpoint\"\nexport AZURE_OPENAI_API_VERSION=\"Azure OpenAI version\"\nexport OPENAI_API_KEY=\"Your OpenAI Key\"\n```\n\n2. Set Cognitive Services Speech key (this is optional and if you want to use speech input \u0026 output).\n\n**Windows:**\n```\nsetx AZURE_AI_SPEECH_KEY \"Your Speech Key\"\nsetx AZURE_AI_SPEECH_REGION \"Your Speech Region\"\n```\n\n**Linux/Mac**\n``` \nexport AZURE_AI_SPEECH_KEY=\"Your Speech Key\"\nexport AZURE_AI_SPEECH_REGION=\"Your Speech Region\"\n```\n\n### Step 7: Launch the application\n\n#### ⌨️ Command Line (CLI)\n\nIn the root of this repository, command:\n\n```\npython main.py\n```\n\nThis command will start the Azure AI Assistant Tool and you can interact with it through its user interface which looks something like this:\n\n![Ai-Assistant-Tool-screenshot](/assets/AzureAIAssistantTool2.png)\n\n### Tool In Action - Add Functions To Your Assistant\n\n![Ai-Assistant-Tool-Functions-screenshot](/assets/AssistantToolMultiFunctions.png)\n\n## 📖 License\nThe Azure AI Assistant Tool is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.\n\n### 📣 Notice Regarding PySide6\nThe Azure AI Assistant Tool uses PySide6, which is licensed under the GNU Lesser General Public License (LGPL).\nBy using PySide6, you are able to modify and redistribute the library under the same license.\nFor more information on PySide6's license, please visit [Qt Licensing](https://www.qt.io/licensing/).\n\n## Contributing\n\nWe welcome contributions and suggestions! Please see the [contributing guidelines] for details.\n\n## Code of Conduct\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). Please see the [code of conduct](CODE_OF_CONDUCT.md) for details.\n\n## Getting Help\n\n### Issues\n\nIf you find a bug in the source code or a mistake in the documentation, feel free to [submit bug report][new issue page].\nOr even better you could submit a pull request with a fix.\n\n### Feature Requests\n\nIf there's an feature that you'd like to see added, feel free to file a [Feature Request][new issue page].\n\nIf you'd like to implement it yourself, please refer to our [contributing guidelines].\n\n[contributing guidelines]: ./CONTRIBUTING.md\n[new issue page]: https://github.com/Azure-Samples/azureai-assistant-tool/issues/new/choose\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure-Samples%2Fazureai-assistant-tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FAzure-Samples%2Fazureai-assistant-tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FAzure-Samples%2Fazureai-assistant-tool/lists"}