Skip to content
Docs Try Aspire
Docs Try

OllamaResource

Handle
📦 CommunityToolkit.Aspire.Hosting.Ollama v13.4.0
interface OllamaResource
extends IComputeResource,
IExpressionValue,
IManifestExpressionProvider,
IOllamaResource,
IResource,
IResourceWithArgs,
IResourceWithConnectionString,
IResourceWithEndpoints,
IResourceWithEnvironment,
IResourceWithProbes,
IResourceWithWaitSupport,
IValueProvider,
IValueWithReferences {
readonly connectionStringExpression: ReferenceExpression;
readonly host: EndpointReferenceExpression;
readonly models: string[];
readonly port: EndpointReferenceExpression;
readonly primaryEndpoint: EndpointReference;
readonly uriExpression: ReferenceExpression;
withDataVolume(
name?: string,
isReadOnly?: boolean): OllamaResource;
withGPUSupport(vendor?: OllamaGpuVendor): OllamaResource;
}

Properties

property connectionStringExpression ReferenceExpression get
Gets the connection string expression for the Ollama server.
property host EndpointReferenceExpression get
Gets the Host property
property models string[] get
Gets the Models property
property port EndpointReferenceExpression get
Gets the Port property
property primaryEndpoint EndpointReference get
Gets the PrimaryEndpoint property
property uriExpression ReferenceExpression get
Gets the UriExpression property

Methods

method withDataVolume builder
Adds a data volume to the Ollama container.
withDataVolume(
name?: string,
isReadOnly?: boolean): OllamaResource
name string optional
isReadOnly boolean optional = False
OllamaResource
method withGPUSupport builder
Adds GPU support to the Ollama container.
withGPUSupport(vendor?: OllamaGpuVendor): OllamaResource
vendor OllamaGpuVendor optional = Nvidia
OllamaResource