Catalog PyPI
PACKAGE EXPLORERView in registry

ai-debate-chat

PyPI

A package for AI debate and chat functionalities

Versions collected1
Direct dependencies14From release 0.1.1
Last observed21 Oct, 10:25 UTC

README

Version 0.1.1 documentation

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:

  1. Collects information from multiple sources:
    • Wikipedia articles
    • Google search results
    • DuckDuckGo search results
  2. Processes content:
    • Text cleaning and preprocessing
    • Removal of non-essential elements
    • Natural language processing with NLTK
  3. 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.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.130 Mar 202514

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
amir-mirfallahi/ai-debate-chat

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 10:25 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:7bf152421fbcb2006052b702baa0fc50a5f9d153cc4941659caf5fd6e357373a