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.43.tar.gz
(29.6 kB
view details)
Built Distribution
File details
Details for the file maitai_python-1.1.43.tar.gz
.
File metadata
- Download URL: maitai_python-1.1.43.tar.gz
- Upload date:
- Size: 29.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.0 CPython/3.9.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 621e5fae2485ffe2bd45e288470db6250678ad9eb248e6c2713dad5c34839f62 |
|
MD5 | ba99c9189b8b51c8f95fb3cb354502b4 |
|
BLAKE2b-256 | c7ee6742dc778e52350a51372f2c027d7290e93874333ab9485d42f507a3f98b |
File details
Details for the file maitai_python-1.1.43-py3-none-any.whl
.
File metadata
- Download URL: maitai_python-1.1.43-py3-none-any.whl
- Upload date:
- Size: 45.2 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 | aad00bb0eaac7e6dd7103122abbc9d12f385c5e2b41f4bae81d3c408e34f0e87 |
|
MD5 | 6b140216054539dcde77c0bd77663fd1 |
|
BLAKE2b-256 | 528af21c3aa9dfa12fdc77914ece58a8c7cba6c51d0bdd1fd6943dabf57ec6d7 |