Official Python SDK for Oryzen AI
Project description
oryzenai
Python SDK for Oryzen AI.
API key format:
olbs_sk_xxxxxxxxxxxxxxxxx
Installation
Local install:
pip install .
After publishing to PyPI:
pip install oryzenai
Quick start
from oryzenai import OryzenAI
client = OryzenAI(api_key="olbs_sk_BURAYA_KEY")
response = client.chat.completions.create(
model="oryzen-v2",
messages=[
{"role": "user", "content": "Merhaba Oryzen AI!"}
],
)
print(response.choices[0].message.content)
Environment variable
export ORYZEN_API_KEY="olbs_sk_BURAYA_KEY"
Then:
from oryzenai import OryzenAI
client = OryzenAI()
response = client.chat.completions.create(
model="oryzen-v2",
messages=[{"role": "user", "content": "Python kodu yaz."}],
)
print(response.choices[0].message.content)
Models
from oryzenai import OryzenAI
client = OryzenAI(api_key="olbs_sk_BURAYA_KEY")
models = client.models.list()
for model in models.data:
print(model.id)
Custom base URL
Default:
https://ai.oryzenlabs.net/v1
Custom:
client = OryzenAI(
api_key="olbs_sk_BURAYA_KEY",
base_url="https://ai.oryzenlabs.net/v1"
)
OpenAI-like style
from oryzenai import OryzenAI
client = OryzenAI(api_key="olbs_sk_BURAYA_KEY")
resp = client.chat.completions.create(
model="oryzen-pro",
messages=[
{"role": "system", "content": "Kısa ve net cevap ver."},
{"role": "user", "content": "Linux'ta Nginx ne işe yarar?"}
]
)
print(resp.choices[0].message.content)
Build for PyPI
python -m pip install --upgrade build twine
python -m build
python -m twine upload dist/*
If the package name is already taken on PyPI, change this line in pyproject.toml:
name = "oryzenai"
For example:
name = "oryzenlabs-ai"
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
oryzenai-0.1.0.tar.gz
(3.9 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
File details
Details for the file oryzenai-0.1.0.tar.gz.
File metadata
- Download URL: oryzenai-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d5696d67fecf87d2b122bab057d500df2c62c258095418f546b06f52746cd71
|
|
| MD5 |
9c0e51fe0be0886e239852ed599019b3
|
|
| BLAKE2b-256 |
020f41142d48f5510d2225e1b2ffae38e662ee674c923e6f4dda7a46e3ed15f6
|
File details
Details for the file oryzenai-0.1.0-py3-none-any.whl.
File metadata
- Download URL: oryzenai-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8329d758c0151ae794cbcf25efd8addfe3553f260650eca7b15dd8631b64f8ac
|
|
| MD5 |
8d190195336ab9fb98d2420093acb643
|
|
| BLAKE2b-256 |
cf634da57fc0259c447849bececdb445f8b89bb49b8f8ca3dcdad5003db3bbfd
|