v2026.10.0
All Bundles
Bundle

Ollama local LLM client. Runs models (Llama, Mistral, Phi, etc.) locally via the Ollama server. Supports chat sessions, embeddings, and model management. Every request completes before returning -- responses are not streamed, so a long generation produces nothing until it finishes. Compile with -lib ollama.

Tool

Tool definition for function calling in chat.

Example

params := JsonParser->TextToElement("{\"type\":\"object\",\"properties\":{\"location\":{\"type\":\"string\"}}}");
tool := Tool->New("get_weather", "Get the weather for a location", params);

Operations

New # constructor

Constructor

New(name:String, description:String, parameters:JsonElement)

Parameters

NameTypeDescription
nameStringfunction name
descriptionStringfunction description
parametersJsonElementJSON schema for parameters

ToJson #

Converts tool to JSON for the request.

method : public : ToJson() ~ JsonElement

Return

TypeDescription
JsonElementJSON element