Prava Python SDK – OpenAI-like API client for LLMs.
Project description
Prava Python SDK
Minimal, OpenAI-like client for the Prava API.
Install
pip install prava
Usage
from prava import Prava
import os
client = Prava(api_key=os.getenv("PRAVA_API_KEY"))
completion = client.chat.completions.create({
"model": "prava-large",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Write a haiku about coffee."},
],
})
print(completion["choices"][0]["message"]["content"])
Configuration
api_key: Explicit API key, or setPRAVA_API_KEYenv var.base_url: Override base URL or setPRAVA_BASE_URLenv var.timeout: Request timeout seconds (default 60).
License
MIT
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
prava-0.1.0.tar.gz
(2.0 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
prava-0.1.0-py3-none-any.whl
(2.7 kB
view details)
File details
Details for the file prava-0.1.0.tar.gz.
File metadata
- Download URL: prava-0.1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
caa5245dfd2120e1052e1ef24f8424b27c40185064342ddb291268bbca9c4da7
|
|
| MD5 |
027c800f56cbbdf4f1a5e0309c0ec31d
|
|
| BLAKE2b-256 |
999b819428b9a7f3a3ab5bf244c90e89147c37803ff8dfff0886f1e5206e2951
|
File details
Details for the file prava-0.1.0-py3-none-any.whl.
File metadata
- Download URL: prava-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2bcf7e70a5c9fda0d4d2c072d1f26ba8e46334cfc7a0a3476c262cd065e44fb
|
|
| MD5 |
da0fa529a5d37c3a8db3bb48720a5baa
|
|
| BLAKE2b-256 |
f79862ffa672a307a8493b0773470fe8587b3ee7d409ecd278928f56c080fbdc
|