AI Debate Chat
A powerful Python package for creating AI-powered debate and chat applications with advanced knowledge retrieval capabilities.
Installation
pip install ai-debate-chat
Features
- Flexible AI Models: Support for multiple AI models including OpenAI, Claude, DeepSeek, local models, and G4F (GPT for Free)
- Smart Information Retrieval: Automatic research on debate topics using Wikipedia, Google, and DuckDuckGo
- Vector Store Database: Efficient storage and retrieval of debate knowledge using FAISS and embeddings
- Conversational Memory: Manages conversation history for contextual responses
- Multi-Perspective Analysis: Presents various viewpoints on complex topics
- Interactive Mode: Built-in interactive terminal interface for immediate use
Quick Start
from ai_debate_chat.debate_chat import AIDebateBot
# Initialize with OpenAI (requires API key)
bot = AIDebateBot(
topic="Climate Change",
model_choice="openai",
api_key="your-api-key"
)
# Generate a response to a question
response = bot.generate_response("What are the main arguments for carbon taxes?")
print(response)
# Or use the interactive mode
bot.run_interactive()
Advanced Usage
Model Options
# Use Claude AI
bot = AIDebateBot(topic="Artificial Intelligence Ethics", model_choice="claude", api_key="your-anthropic-key")
# Use a local model
bot = AIDebateBot(topic="Space Exploration", model_choice="local", local_model_path="path/to/your/model")
# Use G4F (GPT for Free)
bot = AIDebateBot(topic="Quantum Computing", model_choice="g4f")
Custom Memory Management
from langchain.memory import ConversationBufferMemory
# Create custom memory
memory = ConversationBufferMemory(memory_key="chat_history", return_messages=True)
# Initialize bot with custom memory
bot = AIDebateBot(
topic="Cryptocurrency",
model_choice="openai",
api_key="your-api-key",
memory=memory,
max_memory_items=15 # Control memory size
)
# Clear memory when needed
bot.clear_memory()
ML Pipeline Details
The package includes a sophisticated machine learning pipeline that:
- Collects information from multiple sources:
- Wikipedia articles
- Google search results
- DuckDuckGo search results
- Processes content:
- Text cleaning and preprocessing
- Removal of non-essential elements
- Natural language processing with NLTK
- Creates knowledge embeddings:
- Document chunking for better retrieval
- FAISS vector storage for efficient similarity search
- HuggingFace embeddings for semantic understanding
Requirements
- Python 3.10 or higher
- Key dependencies:
- langchain-community
- langchain-huggingface
- langchain-text-splitters
- faiss-cpu
- transformers
- g4f (optional)
- sentence-transformers
- torch
- nltk
- beautifulsoup4
License
MIT License
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
ai_debate_chat-0.1.1.tar.gz
(13.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ai_debate_chat-0.1.1.tar.gz.
File metadata
- Download URL: ai_debate_chat-0.1.1.tar.gz
- Upload date:
- Size: 13.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5affa357f3ea45484b6c611690dd9b88ced41f180e605747003f2a62caa07e3
|
|
| MD5 |
43f6b7f6275bbde0371ccff3d4706bed
|
|
| BLAKE2b-256 |
c027c5fd514008c2e4a62c705c9439ad5b6393a858c685be1aaa51ba6037dada
|
File details
Details for the file ai_debate_chat-0.1.1-py3-none-any.whl.
File metadata
- Download URL: ai_debate_chat-0.1.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fae66418cf3a7e1b299f704ec04ee4b058f598361aef7cb47355f289b4069680
|
|
| MD5 |
be15727bfe5d145486d37e1922695588
|
|
| BLAKE2b-256 |
c134d35aa2d9772b9fa69501021ca6b3364237296ee0b9fdde08abe1bb4f60c7
|