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

Uploaded Source

Built Distribution

maitai_python-1.0.24-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.24.tar.gz
  • Upload date:
  • Size: 19.9 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.24.tar.gz
Algorithm Hash digest
SHA256 2b0355b6a79535bcc05b3215804b69ee8ffdc21ec2f60fd97a120b9bc7e256e7
MD5 5d272ec9567f594cf6ecdf0c0e252228
BLAKE2b-256 59b493d872abcef9db83751f68716aeb9f4ca0e337df97823238baaa5e147700

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.24-py3-none-any.whl
Algorithm Hash digest
SHA256 810490c488cbda0423a8683c8c190e71d5ecf36903c0a48ead6c710215e018c1
MD5 a12b3306d8f2099f0e292e04ab2a76c3
BLAKE2b-256 80c3b7c60414a47c95751a3e850bbf338b2121cc9ac2d70e6771ea925c7d3685

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