GSE AI Server API
This package provides an API for connecting to UB GSE's AI server (powered by LocalAI). See the Computational Literacies Lab handbook page for details about the server.
The documentation provides details on using the API.
Quickstart
from gseai import GSEAIServer
with GSEAIServer("your-api-token") as server:
# List available models
models = server.list_models()
# Simple single-turn chat
response = server.chat("model-id", "What is machine learning?")
# Multi-turn chat using the OpenAI-compatible API
response = server.chat_completions(
"model-id",
messages=[{"role": "user", "content": "What is machine learning?"}],
)
Job queue
Large models can take longer than the server's HTTP timeout to respond. The job queue lets you submit a request and collect the result later — no need to keep a connection open.
from gseai import GSEAIServer
with GSEAIServer("your-api-token") as server:
# Submit a job and get an ID immediately
job = server.submit_job("my-job", "qwen2.5-coder", "Explain transformers.")
job_id = job["job_id"]
# Come back later and wait for it
result = server.wait_for_job(job_id)
print(result["result"])
# File-in jobs (transcribe, image_edit, etc.)
job = server.submit_file_job("transcribe-lecture", "transcribe", "whisper-1", "lecture.mp3")
# Binary-out jobs (speech, images) — fetch the file when done
audio = server.get_job_result(job_id)
open("output.mp3", "wb").write(audio)
The CLI supports the same workflow:
# Submit and walk away
gseai queue submit qwen2.5-coder "Explain transformers." -n my-job
# a3f1c7d2-...
# Check status, then fetch result when done
gseai queue status a3f1c7d2-...
gseai queue wait a3f1c7d2-...
# Or submit and wait in one step
gseai queue run qwen2.5-coder "Explain transformers." -n my-job
# File-in jobs
gseai queue upload whisper-1 lecture.mp3 --job-type transcribe -n lecture
gseai queue wait <job-id>
Metadata
Release files for gseai 1.6.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gseai-1.6.0.tar.gz | 38.6 kB | Without provenance | Details for gseai-1.6.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gseai-1.6.0-py3-none-any.whl | Python 3 | none | any | Details for gseai-1.6.0-py3-none-any.whl |
Total release size: 55.3 kB
Release files / gseai-1.6.0.tar.gz
| Download URL | gseai-1.6.0.tar.gz |
|---|---|
| Size | 38.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3b5cf1a8b22d07be15cc6a0ff8d1cc0e3050e1528ea5058e9957a9e2c03dcffc
|
|
BLAKE2b-256 checksum How to use checksums |
1350fdff29bbd1b562da58c967877877f1e269002dd45ced474710249c53ba55
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / gseai-1.6.0-py3-none-any.whl
| Download URL | gseai-1.6.0-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
161c5f1df06d28df01a22faf9329258a02f237c2b8b68ca111c2e1b6b80569fe
|
|
BLAKE2b-256 checksum How to use checksums |
a7131aba787cefeb496110cb4c6d395ead3c082e4cf5f8a4741a597e9e2156ab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for gseai 1.6.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.