Overview of the Calculator tool
maineval() calls.repository·main·Indexed 20 days ago
https://github.com/servicestack/llmsA lightweight, privacy-focused interface (CLI, API, and Web UI) for interacting with multiple LLMs. It features offline capability, local data storage, and an extension-based architecture allowing for custom builds. The system supports OpenAI-compatible providers, custom configuration via llms.json and providers.json, and specialized extensions such as an Agent Browser Extension for automated browser scripting using agent-browser.
eval() calls.The Projects extension for llms.py provides a workspace management system. It allows you to create dedicated project folders where AI Agents are permitted to read from and write to.
Key Features:
publish output directory as a relative path (e.g., dist) which is combined with the project folder path.The Gallery extension provides a centralized interface for browsing, managing, and navigating assets generated by AI models or uploaded by the user. It automatically intercepts files saved to the LLMs cache and maintains their metadata in a local SQLite database for fast searching and filtering.
Supported Assets:
marked markdown parser to detect and render math equations in both inline and block formats. It handles the necessary frontend assets, including loading katex.min.mjs via Import Maps and injecting katex.min.css for styling.For Gemini 3 series models, you can include multimodal content (images or documents) directly within a functionResponse. This allows the model to process visual or textual data from an external tool to produce a more informed response in the next turn.
image/png, image/jpeg, image/webpapplication/pdf, text/plaininlineData within the functionResponse part.displayName.response field of the functionResponse, you can reference the multimodal part using the JSON reference format: {"$ref": "<displayName>"}. The model will substitute this reference with the actual content.Note: Each displayName can only be referenced once within the structured response field.
{
"functionResponse": {
"name": "get_image",
"response": {
"image_ref": { "$ref": "instrument.jpg" }
},
"parts": [
{
"inlineData": {
"displayName": "instrument.jpg",
"mimeType": "image/jpeg",
"data": "<base64_data>"
}
}
]
}
}Passwords are not stored in plain text. They are hashed using SHA-256 with a unique 16-byte random salt. The stored format in users.json is salt:hex_digest.
Session Management:
~/.llms/credentials/sessions/.llms-token.The skills panel allows you to control which skills Claude can access using three modes:
Server Tools are defined in a server-tools.json file using standard JSON Schema format. The schema serves two purposes:
To define a tool, create an object in a JSON array within server-tools.json. Use the ui property within schema definitions to specify how elements should be rendered (e.g., "widget": "select" or "widget": "hidden").
[
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "tool://openrouter/web_search",
"title": "OpenRouter Web Search Tool",
"description": "Configuration schema for the OpenRouter web_search server tool",
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "openrouter:web_search",
"title": "Tool Type",
"ui": {
"widget": "hidden"
}
},
"parameters": {
"type": "object",
"title": "Search Parameters",
"properties": {
"engine": {
"type": "string",
"title": "Search Engine",
"default": "auto",
"enum": ["auto", "native", "exa", "firecrawl", "parallel", "perplexity"],
"ui": {
"widget": "select"
}
},
"max_results": {
"type": "integer",
"title": "Max Results",
"default": 5,
"minimum": 1,
"maximum": 25,
"ui": {
"widget": "number"
}
}
}
}
}
}
]To maintain a consistent brand or "house style" across multiple templates, use a shared library file (typically lib.typ).
Every template should start with an import statement to access these shared styles, helpers, and configurations:
#import "lib.typ": *
#let data = load-data("invoice.json")
#show: themeBy editing lib.typ once, you can update fonts, colors, logos, and layout helpers (like money() or title-block()) across all templates that import it.
#import "lib.typ": *
#let data = load-data("invoice.json")
#show: themeThe llms.py architecture is based on a lean core and an extension-based model. Most major features are encapsulated in separate extension folders.
Key Concepts:
providers, app, or tools) are layered onto the core.llms/extensions directory in the source repository.