Agents Conversation is a fun and interactive Streamlit application that simulates a conversation between two stand-up comedian chatbots. Using OpenAI’s GPT-3.5 Turbo model, the bots exchange jokes and witty banter in real time. The application features custom avatars, smooth character-by-character message streaming, and animated GIFs to simulate typing and laughing for a more engaging user experience.
- Interactive Chat: Watch two chatbots (Cathy and Joe) exchange jokes in a dynamic conversation.
- Character-by-Character Streaming: Messages are displayed one character at a time for a natural typing effect.
- Custom Avatars: Each chatbot uses a unique avatar, ensuring a personalized look and feel.
- Animated Feedback: Animated GIFs simulate typing and laughing, adding extra personality to the conversation.
- Session State Persistence: Chat history is maintained across interactions for a continuous conversation experience.
- Python 3.8+
- Streamlit
- Required Python packages (listed in
requirements.txt)
-
Clone the Repository:
git clone https://github.com/regostar/agents_conversation.git cd agents_conversation -
** Create a Virtual Environment and Activate It:**
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate- Set Up API Keys
Ensure you have an OpenAI API key and place it in your environment or a configuration file as needed. The application expects a helper function in utils.py (e.g., get_openai_api_key()) to retrieve your key.
- Usage
To start the application, run:
streamlit run app.pyOpen the provided local URL (usually http://localhost:8501) in your browser. The chat between the two agents will begin automatically. Use the provided buttons to continue the conversation or end it.
agents_conversation/
├── app.py # Main Streamlit application
├── autogen/ # Module for managing ConversableAgent logic
├── utils.py # Utility functions (e.g., get_openai_api_key)
├── requirements.txt # List of required Python packages
└── README.md # This file