Skip to main content

MaiTai SDK for Python

Project description

Quickstart

Full docs can be found at https://docs.trymaitai.ai

Configure your application in the Maitai portal

From the Maitai Portal, click the + New Application button to create your first application.

Fill out your application details, and note the Application Reference - you'll need that later

Create your first sentinel

Maitai will analyze your application and automatically create sentinels for you over time. However, if you want to enable governance immediately, you can manually create sentinels as well.

Find your application in the portal and click the + button to create a new sentinel.

Installation

Install the Maitai SDK:

pip install maitai-python

Implementation

Integrating Maitai into your application requires minimal code changes

import maitai as openai

messages = [
    {"role": "system", "content": "You are a helpful assistant"},
    {"role": "user", "content": "Generate numbers 1-10"},
]

response = openai.chat.completions.create(
    messages=messages,
    model="gpt-4",
    session_id="YOUR_SESSION_ID",
    action_type="NUMBER_GENERATOR",
    application_ref_name="YOUR_APPLICATION_REF_NAME",
)

Project details


Release history Release notifications | RSS feed

This version

1.0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

maitai_python-1.0.2.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

maitai_python-1.0.2-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file maitai_python-1.0.2.tar.gz.

File metadata

  • Download URL: maitai_python-1.0.2.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for maitai_python-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b20841641a6f8e98200907e085121530bb3dd8be993b4b819b9c4e5fd75c29b3
MD5 6eb53421c605ae38bd0bd444cb23e75f
BLAKE2b-256 1f1cd4a9aa5e112b59b088e35d23ef178ba98fe54915126d820f524211020eef

See more details on using hashes here.

File details

Details for the file maitai_python-1.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for maitai_python-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 dbcfe055d99a2ba6825b2dc825d928802eb3efd35280c4c2d7b2d6324d3e765d
MD5 336f1326e1b41a465e4193c8ea18db3f
BLAKE2b-256 bab4f81411ccbc21e0a78a61d78836b54fac65dcb7773b6a6623ab76abe3f1dc

See more details on using hashes here.

Supported by

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