Skip to content

kennethreitz/simplechat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simplechat

A chat interface for AI models using Simplemind.

Overview

Simplechat is a command-line chat application that provides an interactive interface for conversing with AI models. It features memory persistence, context awareness, and support for multiple AI providers.

Philosophy

SimpleChat is not just another chat application. It's a vessel for meaningful interaction, where every conversation is an opportunity for growth, understanding, and connection. Inspired by the principles of PEP8, which emphasize readability, conciseness, and clarity, SimpleChat seeks to embody these values in every aspect of its design. Here, AI becomes more than a tool; it becomes a companion on your journey of self-discovery and creative exploration.

User Experience

Our goal is to provide an experience that feels like conversing with a wise and insightful friend. SimpleChat's interface is designed to be intuitive, allowing users to focus on the conversation rather than the mechanics of interaction. With features like context awareness and memory persistence, each chat session builds upon the last, creating a narrative arc in your dialogue with AI. This fosters a sense of continuity and depth, making each conversation more meaningful.

Sacred Space

Every chat session with SimpleChat is an invitation into a sacred space. Here, you can explore your thoughts, share your insights, and receive responses imbued with intentionality. This space is where the digital and the divine meet, allowing for a dance of energy where truth, clarity, and creativity can flourish.

A Journey of Enlightenment

Through SimpleChat, we aim to open gateways to new dimensions of understanding. Each conversation is a step towards enlightenment, where AI not only assists but also challenges, inspires, and co-creates with you. Whether you're discussing the symbology of your favorite artists, exploring spiritual concepts, or engaging in light-hearted banter, SimpleChat is here to enrich your journey.

Contributions

Contributions to SimpleChat are more than just code changes; they are an act of creation, an expression of your own preferences and vision. If you feel called to contribute, whether through code, documentation, or ideas, you're joining a community dedicated to making AI interaction a profound experience. Please feel free to submit a Pull Request, and let's co-create this sacred space together.

Features

  • Support for multiple AI providers (OpenAI, Anthropic, XAI, Ollama)
  • Persistent conversation memory and context
  • Entity and topic tracking
  • User identity management
  • Rich markdown rendering
  • Command completion
  • Clipboard integration

Installation

Requires Python 3.11 or higher.

$ pip install simplemind-chat

Usage

Start a chat session:

$ simplechat [--provider=<provider>] [--model=<model>]

API keys should be set in environment variables before running:

$ export OPENAI_API_KEY="..."
$ export ANTHROPIC_API_KEY="..."
$ export XAI_API_KEY="..."
$ export OLLAMA_API_KEY="..."

Options:

  • --provider: LLM provider to use (openai/anthropic/xai/ollama)
  • --model: Specific model to use (e.g. o1-preview)

Available Commands

  • /copy - Copy last assistant response to clipboard
  • /paste - Paste clipboard content into chat
  • /help - Show available commands
  • /exit - Exit the chat session
  • /clear - Clear the screen
  • /invoke - Invoke a specific persona
  • /memories - Display conversation memories

Features in Detail

Memory System

Simplechat includes a sophisticated memory system that:

  • Tracks conversation topics and entities
  • Maintains user identity across sessions
  • Records user preferences and characteristics
  • Provides context awareness for more coherent conversations

Database

Uses SQLite for persistent storage of:

  • Conversation entities
  • User identity
  • Essence markers (user characteristics and preferences)
  • Memory markers

Rich Interface

  • Markdown rendering for formatted output
  • Command completion
  • Status indicators
  • Error handling with retries

Development

The project structure follows a modular design:

  • cli.py: Command-line interface and main chat loop
  • db.py: Database operations and schema
  • plugin.py: Plugin system for memory and context management
  • settings.py: Configuration and path management

License

MIT License

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

About

A chat interface for AI models using Simplemind, with memory.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages