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

Uploaded Source

Built Distribution

maitai_python-1.0.31-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.31.tar.gz
  • Upload date:
  • Size: 21.4 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.31.tar.gz
Algorithm Hash digest
SHA256 368b2a07f99a9fc1248d0011d421e95908937129683aa605198abc740503ddbe
MD5 a36c6ff04ca1dbc135c6e2b560e92b50
BLAKE2b-256 c64ac4c238fc10ff75c7a52a75d4d299e3cb52d136607ef5ed17757781b7b1ed

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.31-py3-none-any.whl
Algorithm Hash digest
SHA256 06b8212d351b2760b1f83d6296478c4273ea61f8ba67018a1ac34ec055c0aafc
MD5 e4dce192e889a02a9a47730b50a788c2
BLAKE2b-256 14e4bb8bd66b19171d5c51fb997a35bd49a244a4af7e8adbebeb2fa14cac905c

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