Skip to main content
Sinopsis AI Cover Image

Official Sinopsis AI SDK for Python

PyPI version License: MIT

This is the official Python SDK for interacting with Sinopsis AI, designed to simplify the process of logging user prompts and responses, and managing conversation data.

Features

  • Easy Integration: Quickly integrate Sinopsis AI into your Python applications.
  • Session Management: Start, manage, and end sessions with ease.
  • Conversation Logging: Log user prompts and assistant responses with timestamps.
  • API Interaction: Communicate with the Sinopsis AI backend API seamlessly.
  • Error Handling: Robust error handling with retry logic for network requests.

Installation

You can install the package using pip:

pip install sinopsis-ai

Quick Start

Here’s how to get started with the Sinopsis AI SDK:

Import and Initialize the SDK

from sinopsis_ai import SinopsisAI

# Initialize the SDK with your API key
api_key = "your_api_key_here"
client = SinopsisAI(api_key)

Start a Session

# Start a session with a specific user ID
session = client.start_session(user="user_id")

# Alternatively, let the SDK generate a user ID, session ID, and conversation ID automatically
session = client.start_session()

Log a User Prompt

# Log a user's input prompt
client.log_prompt("Hello, how are you?")

Log an Assistant Response

# Log the assistant's response along with model details
client.log_response(
    assistant_response="I'm fine, thank you!",
    chatbot_name="ChatbotName",
    model_name="ModelName",
    model_input={"input": "Hello, how are you?"}
)

End the Session

# End the session, ensuring all data is saved
client.end_session()

Getting Help/Support

If you need help setting up or configuring the Python SDK (or anything else) please send us an email at hello@sinopsisai.com and we're ready to help you!

Resources

License

Licensed under the MIT license, see LICENSE

Metadata

Release files for sinopsis-ai 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sinopsis-ai 0.4.0
File Size Uploaded
sinopsis-ai-0.4.0.tar.gz 5.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for sinopsis-ai 0.4.0
File Interpreter ABI Platform
sinopsis_ai-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / sinopsis-ai-0.4.0.tar.gz

Download URL sinopsis-ai-0.4.0.tar.gz
Size 5.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6efff852e1681366cd9500b9bfb640a293b9b55703dfdee08706b607b52e14c0
BLAKE2b-256 checksum
How to use checksums
d662d1bd2ecf8ddb1ebe5e47615d180fc8ffae22261d2d5b5383d1217d6aea90
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.13

Release files / sinopsis_ai-0.4.0-py3-none-any.whl

Download URL sinopsis_ai-0.4.0-py3-none-any.whl
Size 5.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6463c5745dbe67ff1211ea2545845bc28f59da1e36450ac9f7fe05da8e10a328
BLAKE2b-256 checksum
How to use checksums
632cb96c75848e9e949532a6152a844b3baba1e488a106b60e199397b0aee54e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.13

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page