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

Uploaded Source

Built Distribution

maitai_python-1.0.14-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.14.tar.gz
  • Upload date:
  • Size: 18.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for maitai_python-1.0.14.tar.gz
Algorithm Hash digest
SHA256 667b8e51f9c636acf2caaaab170a9b5ecb4276d3119c1868a1e6e3ee537a5369
MD5 d9f40b0968c9546748fd53d9d5b06419
BLAKE2b-256 2a00d436465029d3114144d2c9fc04ddbad430457f8dcaa867649ec5903f10e0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.14-py3-none-any.whl
Algorithm Hash digest
SHA256 ad31fcc39747f793a3d52b06e8cb884444b02f44500d4497f993835854ee3973
MD5 3685586c6d24fe1abfff13cbc541f479
BLAKE2b-256 8735ca80b8a478b55f9c67748de8b2bd7b9f7f7572e9f9575ef97e2166068bbd

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