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

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

Uploaded Source

Built Distribution

maitai_python-1.0.16-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.16.tar.gz
  • Upload date:
  • Size: 19.5 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.16.tar.gz
Algorithm Hash digest
SHA256 a09c2c2f9c3c652f47250264edc3088874bfa16d4d8750e565edfabfd83d0d73
MD5 cecb290dff43db6a00c6098e2c5d05e0
BLAKE2b-256 c5ca1f22d1219284111d987bc5e4a85590370297f2440f5c81da596638d0cfa4

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.16-py3-none-any.whl
Algorithm Hash digest
SHA256 4b94fe8dd6993cb3fd5453741e02918128e4fef9a2bb6507b74c97bf4692bb8e
MD5 f3c9b19cb767ec85c38508861fca3faa
BLAKE2b-256 25e0dbad1a0b765f7dcba766c41c610fe6e06aee8f0ea0705f4d7e78ca5f2a66

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