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",
    intent="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.29b0.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

maitai_python-1.0.29b0-py3-none-any.whl (33.5 kB view details)

Uploaded Python 3

File details

Details for the file maitai_python-1.0.29b0.tar.gz.

File metadata

  • Download URL: maitai_python-1.0.29b0.tar.gz
  • Upload date:
  • Size: 21.3 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.29b0.tar.gz
Algorithm Hash digest
SHA256 4c71f3636bdc7c73a4590f014f0edb029cf634545639b049a2a5e2991dd446aa
MD5 10d6486ceab5fb229d0bd21a3edde05b
BLAKE2b-256 cc94f59e688bcc50eab111ef843082a37f82e7c3448d3dd177a13ec55d611df9

See more details on using hashes here.

File details

Details for the file maitai_python-1.0.29b0-py3-none-any.whl.

File metadata

File hashes

Hashes for maitai_python-1.0.29b0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8a2fa418e24788f479789f880876791ae446c5afa2655e3cccdf17aaae5d2f4
MD5 aff7fb9d6da952cc41018478da102a2f
BLAKE2b-256 e0e8af1cc4be92a921d2760040fe87c5f85dd45d0a968597e00a1676cfcfa986

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