Metadata-Version: 2.5
Name: chatlie
Version: 0.8.2
Summary: Production-grade, embeddable AI Chatbot Framework in Python
Author: AI Framework Team
License: MIT
Requires-Python: >=3.10
Requires-Dist: aiohttp>=3.8
Requires-Dist: anthropic>=0.30.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: langgraph>=0.0.1
Requires-Dist: pydantic>=2.0
Requires-Dist: pypdf>=3.0.0
Requires-Dist: python-docx>=0.8.11
Requires-Dist: qdrant-client>=1.7.0
Requires-Dist: sqlalchemy>=2.0
Requires-Dist: tiktoken>=0.5.0
Provides-Extra: all
Requires-Dist: aiohttp>=3.8; extra == 'all'
Requires-Dist: openai>=1.0.0; extra == 'all'
Requires-Dist: pypdf>=3.0.0; extra == 'all'
Requires-Dist: python-docx>=0.8.11; extra == 'all'
Requires-Dist: qdrant-client>=2.0.0; extra == 'all'
Requires-Dist: sqlalchemy>=2.0; extra == 'all'
Requires-Dist: tiktoken>=0.5.0; extra == 'all'
Provides-Extra: dev
Requires-Dist: aiohttp>=3.8; extra == 'dev'
Requires-Dist: anthropic>=0.30.0; extra == 'dev'
Requires-Dist: openai>=1.0.0; extra == 'dev'
Requires-Dist: pypdf>=3.0.0; extra == 'dev'
Requires-Dist: pyright>=1.1.0; extra == 'dev'
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: python-docx>=0.8.11; extra == 'dev'
Requires-Dist: qdrant-client>=2.0.0; extra == 'dev'
Requires-Dist: ruff>=0.3.0; extra == 'dev'
Requires-Dist: sqlalchemy>=2.0; extra == 'dev'
Requires-Dist: tiktoken>=0.5.0; extra == 'dev'
Provides-Extra: documents
Requires-Dist: pypdf>=3.0.0; extra == 'documents'
Requires-Dist: python-docx>=0.8.11; extra == 'documents'
Provides-Extra: llm-anthropic
Requires-Dist: anthropic>=0.30.0; extra == 'llm-anthropic'
Provides-Extra: ollama
Requires-Dist: ollama>=0.1.0; extra == 'ollama'
Provides-Extra: openai
Requires-Dist: openai>=1.0.0; extra == 'openai'
Provides-Extra: qdrant
Requires-Dist: qdrant-client>=2.0.0; extra == 'qdrant'
Requires-Dist: tiktoken>=0.5.0; extra == 'qdrant'
Provides-Extra: sql
Requires-Dist: sqlalchemy>=2.0; extra == 'sql'
Provides-Extra: web
Requires-Dist: aiohttp>=3.8; extra == 'web'
Description-Content-Type: text/markdown

# Chatbot Framework

A production-grade Python framework for building embeddable AI chatbots with optional capabilities for SQL databases, web access, RAG (Retrieval-Augmented Generation), validation, and memory management.

**Status**: 232 tests passing | Type-safe (Pyright strict mode) | Production-ready

## Quick Start

### Prerequisites

- Python 3.9+

- pip or poetry

### Installation

1. **Clone the repository**

   ```bash

   git clone <repo-url>

   cd chatbot-builder

   ```

2. **Install dependencies**

   ```bash

   # Using pip

   pip install -e .

   # Or using poetry

   poetry install

   ```

3. **Verify installation**

   ```bash

   pytest tests/ -q

   ```

### Build & Run

**Run all tests:**

```bash

pytest tests/ -q

```

**Run specific test suite:**

```bash

pytest tests/unit/ -v

pytest tests/integration/ -v

```

**Type checking:**

```bash

pyright src/

```

**Code formatting & linting:**

```bash

ruff check src/

ruff format src/

```

## Features

- **Agentic Loop**: Plan → Execute → Observe → Replan

- **Multi-Capability**: SQL, Web, RAG integration

- **Quality Control**: Built-in validators and reflection

- **Memory Management**: Conversation history and context

- **Security**: Credential filtering, authorization checks

- **Observability**: Structured event tracking

- **Modular Design**: Use only what you need

## Project Structure

```

src/chatbot_framework/

├── core/              # Core chatbot engine

├── adapters/          # LLM, DB, and RAG providers

├── planning/          # Query planning engine

├── rag/               # Retrieval-Augmented Generation

├── sql/               # Database query handling

├── tools/             # Built-in tools

├── validation/        # Quality control

├── reflection/        # Self-evaluation

├── memory/            # Conversation memory

├── observability/     # Event tracking

└── web/               # Web capabilities

examples/              # Sample implementations

tests/                 # Test suites

```

## Examples

See the `examples/` directory for sample implementations:

- `01_minimal_chatbot.py` - Basic setup

- `02_knowledge_chatbot.py` - With RAG

- `03_enterprise_chatbot.py` - Full features

- `06_sql_and_rag_chatbot.py` - SQL + RAG

- `07_fastapi_integration.py` - API integration

- `11_local_llm_ollama.py` - Local LLM support

## Configuration

Configure the framework via environment variables or config files:

- API keys for LLM providers

- Database connections

- Vector store settings

- Security policies

See `SIMPLIFIED_API.md` for detailed API documentation and `INTEGRATION_GUIDE.md` for integration examples.

## Testing

The project includes comprehensive test coverage:

```bash

# All tests

pytest tests/

# Specific module

pytest tests/unit/test_config.py -v

# With coverage

pytest tests/ --cov=src/

```

## Type Safety

The project uses Pyright strict mode for type safety:

```bash

pyright src/

```

## Development

Install development dependencies:

```bash

pip install -e ".[dev]"

```

This includes:

- pytest & pytest plugins

- pyright

- ruff

- type stubs

- Modular design

- Composable capabilities

## License

See LICENSE file for details.
