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

This version

1.0.7

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

Uploaded Source

Built Distribution

maitai_python-1.0.7-py3-none-any.whl (29.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.7.tar.gz
  • Upload date:
  • Size: 18.6 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.7.tar.gz
Algorithm Hash digest
SHA256 4232d9ff22aeb2cf60c8bcab2192e23c90d4ade4af806fd53ec54d3bdd4ca8c3
MD5 2283f68af3d1da91343e24b966c895ee
BLAKE2b-256 d2c9d2d7735fcf9428cb7fc834c9bb122ae4429200c751ed9b9fbd18b32cf113

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 b5272af6d9a64743c2f0ff3f1e1fe2b6098afe2464fa32dabfa4f8020f3f2ff8
MD5 0613af2cafe744a021c0ce06c16d095e
BLAKE2b-256 0486a895328962c00a528a71898a6c7d8fdd50fc1377d172ca3f82f042228ead

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