SDK for Charisma.ai
Project description
Charisma.ai SDK for Python
pip install charisma-sdk
Usage
from charisma_sdk.playthrough import Playthrough
from charisma_sdk.api import (
create_playthrough_token,
create_conversation,
set_memory,
set_mood,
)
story_id = 1
token = create_playthrough_token({"story_id": story_id})
conversation_id = create_conversation(token)
set_memory(token, "my_memory_recall", "the value to save!")
set_mood(token, "My Character Name", {"happiness": 15})
playthrough = Playthrough(token)
playthrough.on("message", lambda message: print("Received a message:", message))
playthrough.connect()
# Some time later...
playthrough.start({"conversationId": conversation_id})
# Some time later...
playthrough.reply({"conversationId": conversation_id, "text": "This is my message to send to Charisma."})
Questions?
Get in touch with us at hello@charisma.ai and we'll be happy to help you out!
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
charisma_sdk-0.2.0.tar.gz
(7.8 kB
view details)
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 charisma_sdk-0.2.0.tar.gz.
File metadata
- Download URL: charisma_sdk-0.2.0.tar.gz
- Upload date:
- Size: 7.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
922901f4985ed0751e2db980cac8faf8b4168553050e331cdc946bbba33c3cd4
|
|
| MD5 |
6bcdfd10c2f9671c23ecc932fd99d327
|
|
| BLAKE2b-256 |
cb4ca733f1579c9b802b43b66cfb17d8ad10f6338ed051d0b074b4d5be14d876
|
File details
Details for the file charisma_sdk-0.2.0-py2.py3-none-any.whl.
File metadata
- Download URL: charisma_sdk-0.2.0-py2.py3-none-any.whl
- Upload date:
- Size: 5.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
22fa2c23c26ecfcaca2da00f39d87b0bb4c0cbb5a122733c31d10c59544f8cf4
|
|
| MD5 |
1bb22bbf17d407716ab0c57f2a7b1ce0
|
|
| BLAKE2b-256 |
8e084ebf24409f6e93505006360fc3c98da2537f4dcedc808c046749ff9e84bb
|