Skip to main content

Maitai SDK for Python

Project description

Quickstart

Full docs can be found at https://docs.trymaitai.ai

Installation

Install the Maitai SDK:

pip install maitai-python

Implementation

Implementing Maitai into your application requires minimal code changes.

import maitai

messages = [
    {"role": "system", "content": "You are a helpful ordering assistant..."},
    {"role": "user", "content": "Generate a response to the customer..."},
]

response = maitai.chat.completions.create(
    messages=messages,
    model="llama3-70b-8192",  ## Remove this line to set model in Portal
    session_id="YOUR_SESSION_ID",
    intent="CONVERSATION",
    application="YOUR_APPLICATION_NAME",
)

Note Maitai requires openai version 1.30.1 or later. If you are using an older version, please upgrade.

Run Your Application

Run your application, make sure it makes at least one Chat Completion Request, then head over to https://portal.trymaitai.ai and watch Maitai learn your application in real time.

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

Uploaded Source

Built Distribution

maitai_python-1.1.31b0-py3-none-any.whl (44.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: maitai_python-1.1.31b0.tar.gz
  • Upload date:
  • Size: 28.4 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.1.31b0.tar.gz
Algorithm Hash digest
SHA256 6c9cae1be07f0a727f9d4cb7e1d45b8dad30572221c8addf5ea2fd133c584b37
MD5 03c586c949179d6891a7b55c71655d5e
BLAKE2b-256 01d7203a16daa0f37739d4d8afdf37b4342d787c148e1eb69e1c4c9ef7430542

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for maitai_python-1.1.31b0-py3-none-any.whl
Algorithm Hash digest
SHA256 6b05d28ed377604c88c5d6251a558838911ac1c3e3315347749c1581d8363c28
MD5 997998fb928b34199546c5d8814af403
BLAKE2b-256 c114c342020971cc5b89bee9a8a3564cf8b7cccbf90491578a155a36d1953470

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