Skip to main content

Chat utility library by Spiral.AI

Project description

SpiralChat

SpiralChat is a comprehensive chat utility library developed by Spiral.AI. It provides a set of powerful tools and components for building conversational AI applications.

Features

  • Chat Engine: SpiralChat includes a versatile chat engine that can handle multi-turn conversations, maintain conversation history, and generate contextually relevant responses.
  • Avatar System: Create and manage multiple AI avatars with unique characteristics, speech habits, and knowledge bases.
  • Prompt Templates: Utilize a wide range of customizable prompt templates to structure conversations and guide the AI's responses.
  • Memory Management: Efficiently store and retrieve conversation history with built-in memory management capabilities.
  • Fact Retrieval: Integrate external knowledge sources and retrieve relevant facts based on the conversation context.
  • Gradio Integration: Seamlessly integrate SpiralChat with Gradio, a popular library for building interactive web interfaces for AI models.
  • API Support: Interact with popular language models and AI APIs, including OpenAI's GPT models and Anthropic's Claude.

Installation

You can install SpiralChat using pip:

pip install spchat

For development purposes, you can clone the repository and install the package in editable mode along with the development dependencies:

git clone https://github.com/Spiral-AI/SpiralChat.git
cd SpiralChat
pip install -e ".[dev]"

Usage

SpiralChat provides a high-level interface for building conversational AI applications. Here's a simple example of how to use the chat engine:

from spchat import ChatEngine, APIChatEngine

# Create a chat engine instance
e1 = ChatEngine(model="Spiral-AI/hime", template="calm2")
e2 = APIChatEngine(model="sonnet", on_bedrock=True)

# Engage in a conversation
response_1 = e1.respond("Hello, how are you?")
response_2 = e2.respond("Hello, how are you?")
print(response_1)
print(response_2)

For more advanced usage, such as creating avatars, managing memory, and retrieving facts, refer to the documentation and examples provided in the repository.

Documentation

Detailed documentation for SpiralChat can be found in the docs directory. It covers various topics, including:

  • Getting started guide
  • Chat engine and avatar usage
  • Prompt templating
  • Memory management
  • Fact retrieval
  • Gradio integration
  • API usage and configuration

Examples

The examples directory contains a collection of example scripts and notebooks demonstrating different use cases and features of SpiralChat. These examples serve as a great starting point for building your own conversational AI applications.

Contributing

Contributions to SpiralChat are welcome! If you find any issues, have suggestions for improvements, or want to add new features, please open an issue or submit a pull request. Make sure to follow the guidelines outlined in the CONTRIBUTING.md file.

Support

If you have any questions, concerns, or need assistance with SpiralChat, please reach out to the Spiral.AI team.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spchat-0.2.0.tar.gz (25.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

spchat-0.2.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file spchat-0.2.0.tar.gz.

File metadata

  • Download URL: spchat-0.2.0.tar.gz
  • Upload date:
  • Size: 25.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for spchat-0.2.0.tar.gz
Algorithm Hash digest
SHA256 39488e82d737a90b696690690754586b466cd804fdabee55a9efd34c1da3023c
MD5 2c50cb97ceaf72658c4e7fde99358079
BLAKE2b-256 9eb5916e85115c215d0bd6a1418c25c7ba4e8db7725709b3976a6bc5f2e8ffb8

See more details on using hashes here.

File details

Details for the file spchat-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: spchat-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.13

File hashes

Hashes for spchat-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b7e2c0c04bd91e7850de0c88d455168275b599bd87e46c34102302f74736a48c
MD5 8f592f7b53a29ea085faba3666a07ed7
BLAKE2b-256 e28324567de957c8346a9de599f8c0d37018bd240d83ba0c1182083d1c2e9291

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page