Python SDK for impaction.ai
Project description
impaction.ai Python SDK
This is the official server-side Python SDK for impaction.ai. This library allows you to easily send your data to impaction.ai.
Visit the full documentation to see the detailed usage.
Installation
Install the Python SDK with pip:
pip install impaction-ai
Getting Started
Below is a typical usage of the SDK:
from impaction_ai import ImpactionAI
from impaction_ai.constants import ROLE_USER
# Initialize SDK Client
imp = ImpactionAI(
project_id="PROJECT_ID",
api_key="API_KEY"
)
# Record a user
imp.identify_user(
user_id="USER_ID",
email="USER_EMAIL",
country_code="US"
)
# Open a session
imp.open_session(
session_id="SESSION_ID",
user_id="USER_ID",
assistant_id="ASSISTANT_ID"
)
# Record a message
imp.create_message(
session_id="SESSION_ID",
message_index=1,
role=ROLE_USER,
content="Hey, you there?"
)
# Close a session
imp.close_session(
session_id="SESSION_ID"
)
Refer to the documentation to see more detailed usage.
Contribution
If you have any issues with the SDK, feel free to open Github issues and we'll get to it as soon as possible.
We welcome your contributions and suggestions!
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
impaction_ai-0.1.1.tar.gz
(10.8 kB
view hashes)
Built Distribution
Close
Hashes for impaction_ai-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 950617bf1121866af4903b86a2c15edc9d8ef58099c6dfff88bc78b062e021fe |
|
MD5 | c956157cd23593f597e10a14b70b3ad3 |
|
BLAKE2b-256 | e3adc3b9572c2679b7474d7f05a9b98776a802a580dad68fab2fcc90900012e4 |