IrisAI API Connector
Project description
IrisAI
Create Client
from irisai import IrisAI
client = IrisAI(token="Your_Token")
Chat Completions
response = client.chat_completions(
message="<Your Message>",
model="<Model>",
stream=False, # Optional - Default False
temperature=1, # Optional - Default 1.0
maxtokens=1000 # Optional - Default 4096
) # Need a Token
if stream is true then chat_completions return a iter. else, chat_completions return a str with response text
Models
response = client.info.models() # Don't need a token
Examples
Chat Completions
from irisai import IrisAI
client = IrisAI(token="Your_Token")
response = client.chat_completions(
message="Hello!",
model="IrisAI-latest",
stream=False,
temperature=1,
maxtokens=1000
)
print(response)
Hello! How can I assist you today? Let's have a friendly chat. 😊 How are you doing?
With stream
from irisai import IrisAI
client = IrisAI(token="Your_Token")
response = client.chat_completions(
message="Hello!",
model="IrisAI-latest",
stream=True,
temperature=1,
maxtokens=1000
)
for chunk in response:
print(chunk, flush=True, end="")
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
irisai-1.0.tar.gz
(2.5 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
IrisAI-1.0-py3-none-any.whl
(2.7 kB
view details)
File details
Details for the file irisai-1.0.tar.gz.
File metadata
- Download URL: irisai-1.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d06a8163590fcc0380d195b9795987399e18f471265715055a7e3d15bf94fb4d
|
|
| MD5 |
11c76f014d8d066e327b1e751c24f500
|
|
| BLAKE2b-256 |
4284d0eb17e361532447369ec63fe25d6a83f92041f7ed762c8f95a731f6cb96
|
File details
Details for the file IrisAI-1.0-py3-none-any.whl.
File metadata
- Download URL: IrisAI-1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6eb722236ff89ee33b2ec197ab748671a60b1432f287650217279528e2a19edd
|
|
| MD5 |
596c50c3b50b29fb3b2759b4395f7bcb
|
|
| BLAKE2b-256 |
92a7cc269397f7c35a52bf235eb227afb57b6143996ca80a7902731acfe07331
|