AddOllamaLocal

Method
📦 CommunityToolkit.Aspire.Hosting.Ollama v13.6.1
func (DistributedApplicationBuilder) AddOllamaLocal(
name string,
options ...*AddOllamaLocalOptions,
) OllamaExecutableResource

Signature

methodAddOllamaLocalbuilder
Adds an Ollama executable resource to the application model.
AddOllamaLocal(
name string,
options ...*AddOllamaLocalOptions,
) OllamaExecutableResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
options...*AddOllamaLocalOptionsOptional settings, described under Options.

Optional parameters are passed in a trailing options ...*AddOllamaLocalOptions argument.

Port*float64An optional fixed port to bind to the Ollama process. This will be provided randomly by Aspire if not set.
TargetPort*float64An optional fixed port to run the Ollama process. This will default to 11434 if not set.
OllamaExecutableResource

A reference to the IResourceBuilder.

Returns a handle; failures surface later via Err().

Applies to

This method applies to the following types:

typeDistributedApplicationBuilder