Skip to main content

Add a short description here!

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 ben@charisma.ai and we'll be happy to help you out!

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

charisma-sdk-0.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

charisma_sdk-0.1.0-py2.py3-none-any.whl (4.6 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file charisma-sdk-0.1.0.tar.gz.

File metadata

  • Download URL: charisma-sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for charisma-sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e17006fda6bc2ab0df813c976e695e7ed2f4a3320b695c1023969990494537a0
MD5 da92e91d3c595bf44e12aa9da7648c10
BLAKE2b-256 e0a1e6ab9cb001115baacaab6dedba105d1dc20cc25ff509d19b646d7a4da691

See more details on using hashes here.

File details

Details for the file charisma_sdk-0.1.0-py2.py3-none-any.whl.

File metadata

  • Download URL: charisma_sdk-0.1.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.8.9

File hashes

Hashes for charisma_sdk-0.1.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 6458f5d66d7d027ab1038c34109848ce9eecac1099ef08454620297200aac19d
MD5 4ada8ddb851c0990a1bb9ddad8b43a99
BLAKE2b-256 180dc1b35a6f2c55c8b33af93f8232ca9d25f5e2e72ba52447a3a0f478b13d5d

See more details on using hashes here.

Supported by

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