This repo will be helpful in understanding AutoGen providing examples including prompts and agents for SAAS products, how AutoGen works, and diving into the functionality.
- Ollama: https://ollama.com/
- LM Studio: https://lmstudio.ai/
- PyCharm Download: https://www.jetbrains.com/pycharm/download
- Anaconda Download: https://www.anaconda.com/download
- Visual Studio Code: https://code.visualstudio.com/
- .NET SDK: https://dotnet.microsoft.com/en-us/download
- MemGPT has been updated recently and if we don't use
memgpt configure
to set the openai_key, then it won't work with OpenAI API. I opened issue here: https://github.com/tylerprogramming/ai/issues/1 - issues with function calling connected with LM Studio. GPT function calling works, but as soon as the config is swapped for localhost to LM Studio, they are ignored
- NEED to make sure that if using LM Studio, set the UserAgent to have a default auto reply to "..." or something. LM Studio complains about this because of the interaction\
- FFMPEG: must be installed to use Whisper AI
- GPT-4 Vision with AutoGen
- AutoGen with CodeInterpreter
- AutoGen with TeachableAgent (uses Vector DB to remember conversations)
- Auto Generated Agent Chat: Hierarchy flow using select_speaker
- AutoGen Teams, actually creating separate teams that each do a specific thing and pass on what they accomplished to the next one
- Combining GPT-4 Vision with a library that can take a screenshot of a website, perhaps with stocks for example, and examine it
- Create a Sudoku Puzzle Creator/Checker with an AI WorkForce
- Create WebScraper with Puppeteer
- Create AutoGen with Whisper
- Fitness Tracker with multiple models and LMStudio for LocalLLM
- Fitness Expert Bot with Flask Server
- YouTube Services
- Beginner Course
- Intermediate Course
- Advanced Course
- 05/03/2024 - added directory for frontend code saving and example .net code
- 06/02/2024 - started an integrations directory, and the first one is Airtable + AutoGen
This project demonstrates a simple chatbot for Best Buy customer service using Autogen for conversation generation and Mem0 for memory management.
The bestbuy_basic.py
script creates a context-aware chatbot that can answer customer queries based on previous interactions. It utilizes two main libraries:
- Autogen: For generating AI responses
- Mem0: For storing and retrieving conversation history
- The script uses
dotenv
to load environment variables, including the OpenAI API key.
- A
ConversableAgent
is created with the following configuration:- Name: "chatbot"
- System message: "You are a helpful AI Assistant."
- LLM config: Uses the GPT-4 model
- Code execution is disabled
- Human input is set to "NEVER"
- A
MemoryClient
is instantiated to handle conversation storage and retrieval.
- A sample conversation is added to the Mem0 memory to provide initial context.
The get_context_aware_response
function:
- Searches for relevant memories using Mem0
- Constructs a prompt with the retrieved context and the user's question
- Generates a reply using the Autogen agent
- The script runs an infinite loop, allowing users to input questions
- For each question, it generates a context-aware response using the Autogen agent and Mem0 memory
- When a user asks a question, the script searches for relevant previous interactions in the Mem0 memory.
- It constructs a prompt that includes this context along with the new question.
- The Autogen agent generates a response based on this context-enriched prompt.
- The response is printed, and the loop continues for the next user input.
This approach allows the chatbot to maintain context across multiple interactions, providing more coherent and relevant responses to user queries.
- Ensure you have the required libraries installed:
autogen
,mem0
, andpython-dotenv
. - Set up your OpenAI API key in the
.env
file. - Run the script:
python bestbuy_basic.py
- Interact with the chatbot by typing your questions when prompted.
Note: This is a basic implementation and may require further enhancements for production use.