Skip to main content

galet

Provider-agnostic LLM, embedding, and image generation stack.

Lineage

This package is extracted from the Lucy monorepo (src/llm in /home/junwin/src/repos/lucy) as described in software/ai/lucy/design/llm-module-extraction.md.

It is a fresh repository with no shared git history. The extracted module's behaviour, public interface, optional-SDK import fallbacks, and no-fail-on-missing-credential semantics are preserved as-is; the only intentional change is the configuration boundary (see settings.py in later checkpoints).

Status

Scaffold only. The src/llm modules and their tests are moved into this package in subsequent checkpoints.

Configuration

galet needs two pieces of configuration, and both can be set with an environment variable or a command-line flag.

Credentials (API keys)

Only non-Ollama providers need an API key. galet resolves a key in this order:

  1. The provider's own environment variable (OPENAI_API_KEY, DEEPSEEK_API_KEY, GEMINI_API_KEY, MISTRAL_API_KEY).
  2. A credential file in the directory named by --credential-path, or the GALET_CREDENTIAL_PATH environment variable when no flag is given.

Credential file names:

Provider File Key(s) in the file
openai oaicred.json openai_api_key
deepseek deepseek_cred.json deepseek_api_key
gemini gemini_cred.json gemini_api_key, api_key
mistral mistral_cred.json mistral_api_key

Example credential file (oaicred.json):

{"openai_api_key": "sk-..."}
python samples/send_request.py --credential-path /path/to/credentials --provider openai "hi"
GALET_CREDENTIAL_PATH=/path/to/credentials python samples/send_request.py --provider openai "hi"

Ollama base URL

Ollama needs no API key, but galet must know where the Ollama server is. galet resolves the address in this order:

  1. --ollama-base-url (command-line flag)
  2. OLLAMA_BASE_URL (environment variable)
  3. http://localhost:11434/v1 (default, Ollama's OpenAI-compatible endpoint)
# Default local Ollama
python samples/send_request.py --provider ollama "hi"

# Explicit URL
python samples/send_request.py --provider ollama --ollama-base-url http://localhost:11434/v1 "hi"

# Environment variable
OLLAMA_BASE_URL=http://192.168.87.40:11434/v1 python samples/send_request.py --provider ollama "hi"

Note the /v1 suffix: galet talks to Ollama's OpenAI-compatible endpoint, not the native Ollama API.

Release files for galet 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for galet 0.1.0
File Size Uploaded
galet-0.1.0.tar.gz 40.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for galet 0.1.0
File Interpreter ABI Platform
galet-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 81.1 kB

Release files / galet-0.1.0.tar.gz

Download URL galet-0.1.0.tar.gz
Size 40.7 kB
Tags Source
SHA-256 checksum
How to use checksums
3bb53eb808d0b730c4879307b53a259c28c07b24681a1da781df953b6495d64d
BLAKE2b-256 checksum
How to use checksums
1da9bc1c8cc5f2b7e5449a9b52d679a25c0f8b77e80b199dd6771b00f815746d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release files / galet-0.1.0-py3-none-any.whl

Download URL galet-0.1.0-py3-none-any.whl
Size 40.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b04dd2fb14b1d480aa8c583cb7aa094b40097e06d4ddcf36b9ae5015efc9adf7
BLAKE2b-256 checksum
How to use checksums
fdb216072a282ad06b56dec18159ad26fb3b2db3acd12a19062edf2e70a8661d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.11.2

Release history Release notifications | RSS feed

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page