charisma-sdk-0.1.0
توضیحات
Add a short description here!
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | charisma-sdk-0.1.0 |
| نام | charisma-sdk |
| نسخه کتابخانه | 0.1.0 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | To Play For Ltd. |
| ایمیل نویسنده | hello@charisma.ai |
| آدرس صفحه اصلی | https://github.com/pyscaffold/pyscaffold/ |
| آدرس اینترنتی | https://pypi.org/project/charisma-sdk/ |
| مجوز | Proprietary |
# Charisma.ai SDK for Python
```bash
pip install charisma-sdk
```
## Usage
```python
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!
نیازمندی
| مقدار | نام |
|---|---|
| - | pyee |
| <5.0,>=4.0 | python-socketio[client] |
| - | requests |
| - | importlib-metadata |
| - | setuptools |
| - | pytest |
| - | pytest-cov |
نحوه نصب
نصب پکیج whl charisma-sdk-0.1.0:
pip install charisma-sdk-0.1.0.whl
نصب پکیج tar.gz charisma-sdk-0.1.0:
pip install charisma-sdk-0.1.0.tar.gz