Ollama local LLM client. Runs models (Llama, Mistral, Phi, Qwen, etc.) locally via the Ollama server. Supports text generation, chat sessions with tool calling, structured (JSON schema) output, thinking models, images, batch 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.
ToolCall
A function call the model asked for. Run it, then return the result with Chat->AddToolResult.
Operations
GetArgument #
Get one argument as text (a number or boolean in its JSON form)
method : public : GetArgument(name:String) ~ StringParameters
| Name | Type | Description |
|---|---|---|
| name | String | parameter name |
Return
| Type | Description |
|---|---|
| String | argument text, or Nil if absent |
GetArguments #
Get the call's arguments, an object keyed by parameter name
method : public : GetArguments() ~ JsonElementReturn
| Type | Description |
|---|---|
| JsonElement | arguments |
GetName #
Get the name of the function to call
method : public : GetName() ~ StringReturn
| Type | Description |
|---|---|
| String | function name |
ToJson #
Converts the call to JSON, as it appears in an assistant message
method : public : ToJson() ~ JsonElementReturn
| Type | Description |
|---|---|
| JsonElement | JSON element |