Skip to content

gotohuman/gotohuman-python-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Packages

 
 
 

Contributors

Languages