Unified interface for creating LLM and Agent objects, generating responses, and performing batch inference.
Built on a type-checked and validated ‘S7’ backend.
Features reasoning, structured output, memory management, and tool use.
Supports Ollama, OpenAI-compatible, and Anthropic-compatible endpoints.
Features
LLM |
Agent |
|
|---|---|---|
| Reasoning | ✓ | ✓ |
| Structured output | ✓ | ✓ |
| Tool use | x | ✓ |
| Memory management | x | ✓ |
| Batch generation | ✓ | ✓ |
Installation
GitHub
pak::pak("rtemis-org/llm")Documentation
For detailed documentation, see the rtemis.llm documentation.
Quick Usage
List available Ollama models
LLM
Create an LLM object
llm <- create_Ollama(
model_name = "gemma4:26b",
system_prompt = "You are a meticulous research assistant.",
temperature = 0.3
)
generate(llm, "What is the role of the telomere?")Agent
Create an Agent object
agent <- create_agent(
llmconfig = config_Ollama(
model_name = "gemma4:26b",
temperature = 0.3
),
system_prompt = "You are a meticulous research assistant.",
name = "Kaimana"
)
generate(agent, "Explain quantum superposition in seven bullet points.")