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

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 6c3940d46a1147042ec172eddad5cc44a683a82495ea3b3dd87fc0e35a921b6b
MD5 0e78b27f9a18196caa74edc19a85f866
BLAKE2b-256 7ecd7b558a4b0b2aaba7909d9dbcde3e8effb0423517eefd713beb591fecd053

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f199614038c62c6e79b101ff76682c5e6f7d35ec3b744813b380091d57e03a61
MD5 ba19cd062e4378eea0542a42180bd399
BLAKE2b-256 c62e86b7ca85ad3c129cccd4fb3f0f013386b582ac8fc7e157c9d16081c3b751

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