Unified Interface for Large Language Model Interactions
Overview
Provides a unified interface for interacting with Large Language Models (LLMs) through various providers including OpenAI https://platform.openai.com/docs/api-reference, Ollama https://ollama.com/, and other OpenAI-compatible APIs. Features include automatic connection testing, max_tokens limit auto-adjustment, structured JSON responses with schema validation, interactive JSON schema generation, prompt templating, and comprehensive diagnostics.
Initial CRAN Release
New Features
llm_provider(): Create OpenAI-compatible LLM providers with automatic connection testing and max_tokens auto-adjustmentllm_ollama(): Create Ollama LLM providers with auto-download capability for missing modelsget_llm_response(): Unified interface for getting text or JSON responses from LLMsbuild_prompt(): Template-based prompt construction using glue syntaxset_prompt(): Create structured prompts with system and user messagesgenerate_json_schema(): Interactive JSON schema generation through LLM conversationextract_schema_only(): Extract schema portion from generated resultsdiagnose_llm_connection(): Comprehensive diagnostics for LLM connection issuesollama_list_models(): List available Ollama modelsollama_download_model(): Download models from Ollama registry
Show all changes in 1.0.0Hide the rest of the changes in 1.0.0
ollama_delete_model(): Remove models from Ollama
Provider Support
- OpenAI API
- Ollama (local LLM server)
- DeepSeek API
- Any OpenAI-compatible API endpoints
Key Capabilities
- Automatic max_tokens limit detection and adjustment
- Structured JSON response with schema validation
- Multiple test modes: full, http_only, skip
- Retry mechanism with configurable attempts
- Clean chat history management
- Verbose logging and debugging options
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-03-10
Documentation
- Help pages
- 19 (6 internal)includes a package overview page
- Examples that run
- 33%1 run in a plain check · 2 never run
- Exported functions with examples
- 23%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 0%
Downloads
Repository
5 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/zaoqu-liu/llmhelper on 2026-10-22.
The R CMD check workflow runs on Linux
Dependencies
Code & Tests
People & History
- RR 4.6.0 released · 2026-04-24
- 1.0.0Latest2026-01-31 · current release
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-01-31
- Total releases
- 1 / 1 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 4.1.0
- Download size
- 24 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("llmhelper")The package provides a citation file, so citation() returns the authors' own entry.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.