Skip to content
DocsTry Aspire
DocsTry

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

propertyconnectionStringExpressionReferenceExpressionget
Gets the connection string expression for the Ollama server.
propertyhostEndpointReferenceExpressionget
Gets the Host property
propertymodelsstring[]get
Gets the Models property
propertyportEndpointReferenceExpressionget
Gets the Port property
propertyprimaryEndpointEndpointReferenceget
Gets the PrimaryEndpoint property
propertyuriExpressionReferenceExpressionget
Gets the UriExpression property

Methods

methodwithDataVolumebuilder
Adds a data volume to the Ollama container.
withDataVolume(
name?: string,
isReadOnly?: boolean): OllamaResource
namestringoptional
isReadOnlybooleanoptional= False
OllamaResource
methodwithGPUSupportbuilder
Adds GPU support to the Ollama container.
withGPUSupport(vendor?: OllamaGpuVendor): OllamaResource
vendorOllamaGpuVendoroptional= Nvidia
OllamaResource