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.3

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.3.tar.gz (17.7 kB view details)

Uploaded Source

Built Distribution

maitai_python-1.0.3-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.3.tar.gz
  • Upload date:
  • Size: 17.7 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.3.tar.gz
Algorithm Hash digest
SHA256 acc1d72e9aca80ed76b57a8cccd2d8f0a4b37360cb2b704aa08fd962994a87e4
MD5 bcd21519a63a63b02d524123ef66f588
BLAKE2b-256 7d4946ecaf753601256086df8a1cb60c91a18a5c33a062ddc1e7d2b2749c74d4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 81303fa2b1bff0120a0bfac3fca118e77e07c07f0d63323544cb69a85d44a015
MD5 18db0d08c26571ebf90eb382d4c3afb0
BLAKE2b-256 32bb344dea9fc1c811e151e220b1bd8a0c34a2ce136ac68e505b04f93929af59

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