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.21.tar.gz
(27.0 kB
view details)
Built Distribution
File details
Details for the file maitai_python-1.1.21.tar.gz
.
File metadata
- Download URL: maitai_python-1.1.21.tar.gz
- Upload date:
- Size: 27.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59269bb7a451f42341bfc4b5f58c825c23b7576ae0b2179a1653e1530413849f |
|
MD5 | d4f07ef3942f64a94b2aa007bec833e9 |
|
BLAKE2b-256 | 719382c731c85c68d0f37f5f98f36121e2ba89654e503c58ca95666b3db81840 |
File details
Details for the file maitai_python-1.1.21-py3-none-any.whl
.
File metadata
- Download URL: maitai_python-1.1.21-py3-none-any.whl
- Upload date:
- Size: 42.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fcfab5c92d75d82f3dede6b079141f3e4874991b842ad54c935f2bd38ac75be3 |
|
MD5 | 0e8e946d70f6d4df3d5c78b329fb038e |
|
BLAKE2b-256 | 8f2e9127d3413e66ffed99254a057f21c139664e10118f3a32748ec68a0e423a |