Skip to main content

Python SDK for gotoHuman

Project description

gotoHuman Logo

gotoHuman - Human in the Loop for AI workflows

MIT License PyPI Version GitHub Repo stars Discord

gotoHuman is a web app where you can approve actions of your AI agents. Keep a human in the loop to review AI‑generated content, approve critical actions or provide input.

Install

pip install gotohuman

Init

Create a review template in gotoHuman adding fields to capture the content to review and the input and feedback you want to collect.

Setup environment variables with your API key and an agent ID.

GOTOHUMAN_API_KEY=YOUR_API_KEY
GOTOHUMAN_AGENT_ID=YOUR_AGENT_ID

Initialize the SDK:

from gotohuman import GotoHuman

gotoHuman = GotoHuman()
# or: GotoHuman(api_key="...", agent_id="...")

Send request

Request a new review and include the data for your review template's fields.
Read the docs for more details.

Example request:

review = gotoHuman.create_review("YOUR_REVIEW_TEMPLATE_ID")
review.set_review_data({
    "ai_social_media_post": ai_text_draft,
    "ai_image": ai_image_url,
})
review.add_meta_data("threadId", threadId)
review.assign_to_users(["jess@acme.org"])
try:
    response = review.send_request()
    print("Review sent successfully:", response)
except Exception as e:
    print("An error occurred:", e)

Optionally pass a config object to control review behavior:

review.set_review_config({"someOption": True})

Or send asynchronously:

response = await review.async_send_request()

Example review

gotoHuman - Human approval example

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

gotohuman-0.2.4.tar.gz (6.0 kB view details)

Uploaded Source

Built Distribution

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

gotohuman-0.2.4-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file gotohuman-0.2.4.tar.gz.

File metadata

  • Download URL: gotohuman-0.2.4.tar.gz
  • Upload date:
  • Size: 6.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for gotohuman-0.2.4.tar.gz
Algorithm Hash digest
SHA256 0aa6f7c8a6b218f98f9cd4b7fc58e5b5b66668ea7c7e4e303446e6143f44427f
MD5 12ece71fdee2f48d12fd60714045a71b
BLAKE2b-256 0fce4b9abac41fdd1f58abe40cb4347f9cf6119109899ff1cdd10d28687f545c

See more details on using hashes here.

File details

Details for the file gotohuman-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: gotohuman-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.0

File hashes

Hashes for gotohuman-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 a57fd465f2863bb833cdc400e2576adfb60b60b9acdf5322b10a3a1baa05e4d3
MD5 7e122d0ca25d4fd70bc7a39c115191b5
BLAKE2b-256 4aa302b682f3ba6614d9e5a660b90454ff506e35806d19fb5ced041f451fe2fe

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