Skip to main content

MaiTai SDK for Python

Project description

Quickstart

Full documents 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

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.1b0.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

maitai_python-1.0.1b0-py3-none-any.whl (21.8 kB view details)

Uploaded Python 3

File details

Details for the file maitai_python-1.0.1b0.tar.gz.

File metadata

  • Download URL: maitai_python-1.0.1b0.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.9.6

File hashes

Hashes for maitai_python-1.0.1b0.tar.gz
Algorithm Hash digest
SHA256 264c52821681c1d8450fd34160ed2a3cdbb7e22ed8b1ad18900692850e7bb96e
MD5 9904975bd4378e638ba71f30a9a388cc
BLAKE2b-256 ef5d198545dc0b34b47d57f21cc6b947f10f093586734f9b14eceef00308d730

See more details on using hashes here.

File details

Details for the file maitai_python-1.0.1b0-py3-none-any.whl.

File metadata

File hashes

Hashes for maitai_python-1.0.1b0-py3-none-any.whl
Algorithm Hash digest
SHA256 a77fc27ae10da3d9048877aa35626b8ac4a158c59efb74f06397701fc90d8ef1
MD5 fce099847f36612f453b675c2dbf226f
BLAKE2b-256 94f8ce32f50ff65b2f614cac33860eed6b975963df2bddafca0bff069332b8a5

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