SDK for interacting with the PromptStream API
Project description
PromptStream SDK
A small client library for interacting with the PromptStream API.
Usage
from promptstream.client import PromptStreamClient
client = PromptStreamClient(api_key="your-key")
# run a prompt
resp = client.run_prompt("prompt-123", {"name": "Alice"})
# track different outcomes
client.track_click(resp.run_id, "prompt-123", "cta", source="app")
client.track_conversion(resp.run_id, "prompt-123", "signup", source="app")
client.track_feedback(resp.run_id, "prompt-123", "feedback", True, source="app")
client.track_rating(resp.run_id, "prompt-123", "rating", 5, source="app")
client.track_engagement(resp.run_id, "prompt-123", "scroll", 80, source="app")
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
promptstream-0.1.3.tar.gz
(3.7 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 promptstream-0.1.3.tar.gz.
File metadata
- Download URL: promptstream-0.1.3.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f69670f88d060dfc224461e556a162f61cda6ba7fa2715dbcd12a58e035a2580
|
|
| MD5 |
f30b9c6a751b51809674f77f36bbcd29
|
|
| BLAKE2b-256 |
b68a10ee0de27f516f113bf39b2e617bd3c495fc669a8ea505de7013d5496279
|
File details
Details for the file promptstream-0.1.3-py3-none-any.whl.
File metadata
- Download URL: promptstream-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f6bc87de071b8dbc712beae067b172f6f6314846e406c0d8cecc5b92c70f2f86
|
|
| MD5 |
a5b376fd325abfc337f7da1ca3f1c24a
|
|
| BLAKE2b-256 |
f57afff933292e66308b3b973986b0b5310bd4f32e633064acba344a66d71d41
|