Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

promptstream-0.1.3-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for promptstream-0.1.3.tar.gz
Algorithm Hash digest
SHA256 f69670f88d060dfc224461e556a162f61cda6ba7fa2715dbcd12a58e035a2580
MD5 f30b9c6a751b51809674f77f36bbcd29
BLAKE2b-256 b68a10ee0de27f516f113bf39b2e617bd3c495fc669a8ea505de7013d5496279

See more details on using hashes here.

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

Hashes for promptstream-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 f6bc87de071b8dbc712beae067b172f6f6314846e406c0d8cecc5b92c70f2f86
MD5 a5b376fd325abfc337f7da1ca3f1c24a
BLAKE2b-256 f57afff933292e66308b3b973986b0b5310bd4f32e633064acba344a66d71d41

See more details on using hashes here.

Supported by

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