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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chatweaver-0.0.1.tar.gz.
File metadata
- Download URL: chatweaver-0.0.1.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d5443caf3a080fbec6cd1258adc54a4e34fd801fe9c1a07f71e310a3fab65f35
|
|
| MD5 |
fcce45fd2d0b956412eec546cec0db1b
|
|
| BLAKE2b-256 |
c66cae376b2cd26827bf3988b5bf499497cd5168e391c7475aae62897bf557fe
|
File details
Details for the file chatweaver-0.0.1-py3-none-any.whl.
File metadata
- Download URL: chatweaver-0.0.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69331f9a395539128dc845bba11fc3d76aa7303177c1d40a198ab9cf48b601ab
|
|
| MD5 |
8663a1fa920127adc93d950353582f51
|
|
| BLAKE2b-256 |
ab3b5b39d4a0e39a7328117e2807046e5153676fe600dbda4577843906869119
|