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",
    intent="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.29.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

maitai_python-1.0.29-py3-none-any.whl (32.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.29.tar.gz
  • Upload date:
  • Size: 20.7 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.29.tar.gz
Algorithm Hash digest
SHA256 ace4cf98e1c9fa52be996b73ff8ec9521dee160e452b0d4a351d42134965c983
MD5 443e39ac9a467138baca70a6dad63f2a
BLAKE2b-256 41cf3915d5c0b4d303da9422936bae38903de8d5bc8824ac7b64cb4c194559bb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 8dbaf3ca89a45dfea43595b1d690e418b157178a1ef0389f0e618a4f88268e38
MD5 38303441708111d5faf4300d55910609
BLAKE2b-256 dac897d664a10b418e945d7b6f1b5df41afc6e4f733c9981d83b9e05956279f6

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