# IOllamaResource

- Kind: `interface`
- Package: [CommunityToolkit.Aspire.Hosting.Ollama](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama.md)
- Version: `13.4.0`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/d9dc6fc02412d7398c5722840513d99965a6e98f/src/CommunityToolkit.Aspire.Hosting.Ollama/IOllamaResource.cs)
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithEndpoints`, `IValueProvider`, `IValueWithReferences`

Represents an Ollama resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public interface IOllamaResource
    : Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithEndpoints,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## ATS metadata

### ATS export

- Type ID: `CommunityToolkit.Aspire.Hosting.Ollama/IOllamaResource`

## Properties

- [Host](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource/properties.md#host) : `EndpointReferenceExpression` `abstract` `get` -- Gets the host endpoint reference for this resource.
- [Models](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource/properties.md#models) : `IReadOnlyList<string>` `abstract` `get` -- Gets the list of models to download on initial startup.
- [Port](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource/properties.md#port) : `EndpointReferenceExpression` `abstract` `get` -- Gets the port endpoint reference for this resource.
- [PrimaryEndpoint](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource/properties.md#primaryendpoint) : `EndpointReference` `abstract` `get` -- Gets the endpoint for the Ollama server.
- [UriExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource/properties.md#uriexpression) : `ReferenceExpression` `abstract` `get` -- Gets the connection URI expression for the Ollama server.

## Methods

- [AddModel(string)](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource/methods.md#addmodel-string) `abstract` -- Adds a model to the list of models to download on initial startup.
