API reference

OllamaProvider Class

Implements IChatTask

Fields

host : string
Signature
string host
model : string
Signature
string model

Protected Properties

DefaultSupportedTypes : override InferenceType
[Get]
Signature
override InferenceType DefaultSupportedTypes

Properties

SupportsVision : bool
[Get]
Indicates whether this provider will package images for multimodal local models (for example, llava).
Disable when using text-only models to avoid unnecessary payload work.
See IChatTask and local model requirements in Ollama docs.
Signature
bool SupportsVision

Methods

ChatAsync ( req , stream , ct )
Sends a prompt to a local Ollama server and returns assistant text.
Supports optional image inputs by converting them to base64 when SupportsVision is enabled.
See IChatTask. Ollama API: https://docs.ollama.com/
Signature
async Task< ChatResponse > ChatAsync(ChatRequest req, IProgress< ChatDelta > stream=null, CancellationToken ct=default)
Parameters
req: ChatRequest  Message and optional images.
stream: IProgress< ChatDelta >  Optional partial callback; final text is still returned.
ct: CancellationToken  Cancellation token for request/HTTP.
Returns
async Task< ChatResponse >  ChatResponse containing text plus raw JSON for inspection.