# OllamaExecutableResource

- Kind: `class`
- 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/OllamaExecutableResource.cs)
- Inherits: `ExecutableResource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, [IOllamaResource](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource.md), `IResource`, `IResourceWithConnectionString`, `IResourceWithEndpoints`, `IValueProvider`, `IValueWithReferences`

A resource that represents an Ollama executable resource.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class OllamaExecutableResource
    : Aspire.Hosting.ApplicationModel.ExecutableResource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IOllamaResource,
      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/OllamaExecutableResource`

## Remarks

Constructs an [OllamaExecutableResource](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/ollamaexecutableresource.md).

## Constructors

- [OllamaExecutableResource(string)](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/ollamaexecutableresource/constructors.md#constructor-string) -- A resource that represents an Ollama executable resource.

## Properties

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

## Methods

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