Skip to main content

A simple (for the moment) package that allows you to implement the back-end of a ai chat-bot with openai models in python.

Project description

ChatWeaver

ChatWeaver is a Python library that simplifies the implementation of chatbots powered by OpenAI models. Designed with developers in mind, it provides powerful features and an intuitive interface to enhance the development of conversational AI.

Features

  • Chat History Management: Easily track and manage conversation context.
  • Message Templates: Automatically remember and include previous messages in prompts.
  • File Integration: Add images and PDF files to your prompts seamlessly.
  • Custom Model Support: Compatible with various OpenAI models.
  • Extensibility: Flexible architecture for scalable chatbot solutions.

Installation

Install ChatWeaver using pip:

pip install chatweaver

Quick Start

Here’s how you can get started with ChatWeaver:

import chatweaver as cw

chat: cw.Chat = cw.Chat(
    model="gpt-4o", 
    api_key="<Your API key here>", 
    rules=cw.chat_weaver_rules["basic"], 
    name="ChatWeaverBot", 
    replies_limit=10, 
    user="User"
    )

prompt: str = "Hi how are you?"
response = chat.get_response(prompt=prompt, user="User")

Requirements

  • Python 3.8 or above.
  • OpenAI Python library (openai).

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

chatweaver-0.0.2.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

chatweaver-0.0.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file chatweaver-0.0.2.tar.gz.

File metadata

  • Download URL: chatweaver-0.0.2.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chatweaver-0.0.2.tar.gz
Algorithm Hash digest
SHA256 20fe20002de3a3a3ff6817cfc0acaa8a06e61a7dbd0a423dcd0f43cbc0106517
MD5 05f92df352b431f8026b2d6bf014bfb1
BLAKE2b-256 22b25da56a32f1d803ac31e88e501372f458399e0b6ed8255ed5df783244e7ea

See more details on using hashes here.

File details

Details for the file chatweaver-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: chatweaver-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for chatweaver-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6eb02736818b8f4db380f067efd097dd1f24a68ab868ae6d5faa93d83305f4fa
MD5 9617482e80e7a4d499113ecb1265295c
BLAKE2b-256 e86b6871594f3b0d3dca7b484ffb34e43350818e867ac1942d7e85c7c6676a75

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