addOllamaLocal

Method
📦 CommunityToolkit.Aspire.Hosting.Ollama v13.6.1
interface IDistributedApplicationBuilder {
// ... omitted for brevity
addOllamaLocal(
name: string,
port?: number,
targetPort?: number): OllamaExecutableResource;
}

Signature

methodaddOllamaLocalbuilder
Adds an Ollama executable resource to the application model.
addOllamaLocal(
name: string,
port?: number,
targetPort?: number): OllamaExecutableResource
namestringThe name of the resource. This name will be used as the connection string name when referenced in a dependency.
portnumberoptionalAn optional fixed port to bind to the Ollama process. This will be provided randomly by Aspire if not set.
targetPortnumberoptionalAn optional fixed port to run the Ollama process. This will default to 11434 if not set.
OllamaExecutableResource

Applies to

This method applies to the following types: