Configuration & providers
One function, four providers, no config files.
The mental model
Reveilio stores a single process-global ReveilioConfig object. You set
it with reveilio.configure(...), and every other call reads from it.
There is no .reveilio.yaml, no Settings class, and no
dependency injection.
If you never call configure() but an environment variable such as
GEMINI_API_KEY or OPENAI_API_KEY is set, reveilio will
auto-configure on first use. An explicit configure() call always
overrides environment values.
Gemini (Google AI Studio)
reveilio.configure(
provider="gemini",
api_key="AIza...", # or leave out and set GEMINI_API_KEY
model="gemini-2.5-flash", # optional; this is the default
)
Environment fallback: GEMINI_API_KEY or GOOGLE_API_KEY.
OpenAI
reveilio.configure(
provider="openai",
api_key="sk-...", # or OPENAI_API_KEY env var
model="gpt-4o-mini", # or gpt-4o, gpt-4-turbo, etc.
)
Any chat-completions-compatible model ID that your account has access to is supported.
Azure OpenAI
Azure requires three additional values: endpoint, deployment name, and (optionally) API version. Note that the model name is the deployment name you configured in the Azure portal.
reveilio.configure(
provider="azure",
api_key="...", # AZURE_OPENAI_API_KEY env var
azure_endpoint="https://my-rsrc.openai.azure.com",
azure_deployment="gpt-4o", # deployment name, not model name
azure_api_version="2024-02-15-preview", # optional
)
Environment fallbacks: AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT,
AZURE_OPENAI_DEPLOYMENT, AZURE_OPENAI_API_VERSION.
Ollama (self-hosted and local)
reveilio.configure(
provider="ollama",
base_url="http://localhost:11434", # default
model="llama3.2", # or any model you have pulled
)
No API key is used. Environment fallback: OLLAMA_BASE_URL. Be sure to
run ollama pull llama3.2 (or your chosen model) before invoking reveilio.
Tuning the scoring weights
The default weights sum to 1.0 and reflect a general-purpose hiring rubric:
| Dimension | Default weight |
|---|---|
| skills | 20% |
| semantic_skills | 20% |
| experience | 25% |
| education | 15% |
| certifications | 10% |
| soft_skills | 5% |
| domain_relevance | 5% |
Hiring for a compliance role? Increase certifications. Hiring for a research lab?
Increase education. Pass a custom weights dictionary to configure():
reveilio.configure(
provider="openai",
api_key="sk-...",
weights={
"skills": 0.30,
"semantic_skills": 0.20,
"experience": 0.25,
"education": 0.05,
"certifications": 0.15,
"soft_skills": 0.03,
"domain_relevance": 0.02,
},
)
The prompt sent to the LLM includes these weights verbatim so the model knows what you are optimizing for.
Switching providers at runtime
Call configure() again. The most recent call wins.
reveilio.configure(provider="gemini", api_key="AIza...")
quick_pass = reveilio.analyze_folder("./resumes", jd)
reveilio.configure(provider="openai", api_key="sk-...", model="gpt-4o")
deep_pass = reveilio.analyze_folder("./resumes", jd)
Continue to Guides.