Here are some screenshots of the chatbot in action:
This project is a chatbot implementation using Microsoft's AutoGen framework and Azure OpenAI services. The chatbot is designed to handle various tasks, including retrieving product information, policy details, claim details, and more.
- Product Information: Retrieve information about product.
- Policy Details: Fetch details about user policies based on policy numbers.
- Claim Details: Get information about claims using claim IDs.
- Document Retrieval: Retrieve policy and invoice documents.
- Asynchronous Operations: Handle tasks asynchronously for better performance.
- Memory Management: Utilize memory stores to keep track of user preferences and context.
- Multi-Agent System: Use different strategies for agent collaboration (RoundRobin and Selector).
-
Clone the repository:
git clone https://github.com/iamchandanys/chatbot-az-autogen.git cd chatbot-az-autogen -
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate
- On macOS/Linux:
source .venv/bin/activate
- On Windows:
-
Install the dependencies:
pip install -r requirements.txt
-
Set up environment variables: Create a .env file in the root directory and add your Azure OpenAI credentials:
api_key=your_api_key deployment_name=your_deployment_name model_name=your_model_name api_version=your_api_version azure_endpoint=your_azure_endpoint api_to_upload_files=api_to_upload_files
There are two entry points for running the chatbot, each using a different strategy for agent collaboration:
-
RoundRobinGroupChat: This strategy involves agents taking turns in a round-robin fashion.
python 03_x_agent.py
-
SelectorGroupChat: This strategy involves selecting the most appropriate agent for each task.
python 03_x_agent_v2.py
- The chatbot will prompt you for input.
- Type your queries and get responses from the chatbot.
- x_agent.py: Entry point for the chatbot using RoundRobinGroupChat.
- x_agent_v2.py: Entry point for the chatbot using SelectorGroupChat.
- home.py Flask application to serve the chat interface and handle real-time communication with the chatbot.
- system_prompts.py: Contains system messages for different agents.
- system_tools.py: Defines the tools used by the agents to perform various tasks.
- README.md: This file, providing an overview of the project.
- .env: Environment variables for Azure OpenAI credentials (not included in the repository).

