Skip to main content

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.

Metadata

Release files for spchat 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for spchat 0.2.0
File Size Uploaded
spchat-0.2.0.tar.gz 25.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for spchat 0.2.0
File Interpreter ABI Platform
spchat-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 54.8 kB

Release files / spchat-0.2.0.tar.gz

Download URL spchat-0.2.0.tar.gz
Size 25.1 kB
Tags Source
SHA-256 checksum
How to use checksums
39488e82d737a90b696690690754586b466cd804fdabee55a9efd34c1da3023c
BLAKE2b-256 checksum
How to use checksums
9eb5916e85115c215d0bd6a1418c25c7ba4e8db7725709b3976a6bc5f2e8ffb8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release files / spchat-0.2.0-py3-none-any.whl

Download URL spchat-0.2.0-py3-none-any.whl
Size 29.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b7e2c0c04bd91e7850de0c88d455168275b599bd87e46c34102302f74736a48c
BLAKE2b-256 checksum
How to use checksums
e28324567de957c8346a9de599f8c0d37018bd240d83ba0c1182083d1c2e9291
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.13

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page