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

Uploaded Source

Built Distribution

maitai_python-1.0.12-py3-none-any.whl (29.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for maitai_python-1.0.12.tar.gz
Algorithm Hash digest
SHA256 63a788ce85a548b08ecfa77573599f636ce285ae3aafa4f0b5d2e51b522631d0
MD5 68d9eebf0920a2359b3ad6ae858113bc
BLAKE2b-256 73638d7edfd4c17ef78ce71e9cbf0b50859ea494ac22cea7b3634beee49a40e2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.12-py3-none-any.whl
Algorithm Hash digest
SHA256 706e5fa872d779ccc2eb1ae2d6f8b3ae2b84413157fe4593941bf47054740c70
MD5 f03734e5f6c08b0f041438b54dbd5a10
BLAKE2b-256 805ff305e67511459ae9e8c0f4ed953b57b5dc2bc1fa22d1ee7b5dad797abecb

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