Name | IrisAI JSON |
Version |
1.0
JSON |
| download |
home_page | None |
Summary | IrisAI API Connector |
upload_time | 2024-10-25 13:09:40 |
maintainer | None |
docs_url | None |
author | Tes |
requires_python | >=3.12 |
license | None |
keywords |
irisai
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# IrisAI
## Create Client
```python
from irisai import IrisAI
client = IrisAI(token="Your_Token")
```
## Chat Completions
```python
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
```python
response = client.info.models() # Don't need a token
```
# Examples
### Chat Completions
```python
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
```python
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="")
```
Raw data
{
"_id": null,
"home_page": null,
"name": "IrisAI",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "IrisAI",
"author": "Tes",
"author_email": "dev@tesnpe.ru",
"download_url": "https://files.pythonhosted.org/packages/42/84/d0eb17e361532447369ec63fe25d6a83f92041f7ed762c8f95a731f6cb96/irisai-1.0.tar.gz",
"platform": null,
"description": "# IrisAI\r\n\r\n## Create Client\r\n\r\n```python\r\nfrom irisai import IrisAI\r\n\r\nclient = IrisAI(token=\"Your_Token\")\r\n```\r\n\r\n## Chat Completions\r\n```python\r\nresponse = client.chat_completions(\r\n\tmessage=\"<Your Message>\",\r\n\tmodel=\"<Model>\",\r\n\tstream=False, # Optional - Default False\r\n\ttemperature=1, # Optional - Default 1.0\r\n\tmaxtokens=1000 # Optional - Default 4096\r\n) # Need a Token\r\n```\r\nif stream is true then chat_completions return a iter.\r\nelse, chat_completions return a str with response text\r\n\r\n## Models\r\n```python\r\nresponse = client.info.models() # Don't need a token\r\n```\r\n\r\n# Examples\r\n### Chat Completions\r\n```python\r\nfrom irisai import IrisAI\r\n\r\nclient = IrisAI(token=\"Your_Token\")\r\nresponse = client.chat_completions(\r\n message=\"Hello!\",\r\n model=\"IrisAI-latest\",\r\n stream=False,\r\n temperature=1,\r\n maxtokens=1000\r\n)\r\n\r\nprint(response)\r\n```\r\n```\r\nHello! How can I assist you today? Let's have a friendly chat. \ud83d\ude0a How are you doing?\r\n```\r\n##### With stream\r\n```python\r\nfrom irisai import IrisAI\r\n\r\nclient = IrisAI(token=\"Your_Token\")\r\nresponse = client.chat_completions(\r\n message=\"Hello!\",\r\n model=\"IrisAI-latest\",\r\n stream=True,\r\n temperature=1,\r\n maxtokens=1000\r\n)\r\n\r\nfor chunk in response:\r\n print(chunk, flush=True, end=\"\")\r\n```\r\n",
"bugtrack_url": null,
"license": null,
"summary": "IrisAI API Connector",
"version": "1.0",
"project_urls": null,
"split_keywords": [
"irisai"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "92a7cc269397f7c35a52bf235eb227afb57b6143996ca80a7902731acfe07331",
"md5": "596c50c3b50b29fb3b2759b4395f7bcb",
"sha256": "6eb722236ff89ee33b2ec197ab748671a60b1432f287650217279528e2a19edd"
},
"downloads": -1,
"filename": "IrisAI-1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "596c50c3b50b29fb3b2759b4395f7bcb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 2653,
"upload_time": "2024-10-25T13:09:38",
"upload_time_iso_8601": "2024-10-25T13:09:38.367909Z",
"url": "https://files.pythonhosted.org/packages/92/a7/cc269397f7c35a52bf235eb227afb57b6143996ca80a7902731acfe07331/IrisAI-1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "4284d0eb17e361532447369ec63fe25d6a83f92041f7ed762c8f95a731f6cb96",
"md5": "11c76f014d8d066e327b1e751c24f500",
"sha256": "d06a8163590fcc0380d195b9795987399e18f471265715055a7e3d15bf94fb4d"
},
"downloads": -1,
"filename": "irisai-1.0.tar.gz",
"has_sig": false,
"md5_digest": "11c76f014d8d066e327b1e751c24f500",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 2483,
"upload_time": "2024-10-25T13:09:40",
"upload_time_iso_8601": "2024-10-25T13:09:40.267032Z",
"url": "https://files.pythonhosted.org/packages/42/84/d0eb17e361532447369ec63fe25d6a83f92041f7ed762c8f95a731f6cb96/irisai-1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-25 13:09:40",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "irisai"
}