# OllamaModelResource

- 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/OllamaModelResource.cs)
- Inherits: `Resource`
- Implements: `IExpressionValue`, `IManifestExpressionProvider`, `IResource`, `IResourceWithConnectionString`, `IResourceWithParent`, `IResourceWithParent<IOllamaResource>`, `IValueProvider`, `IValueWithReferences`

A resource that represents an ollama model.

## Definition

```csharp
namespace Aspire.Hosting.ApplicationModel;

public class OllamaModelResource
    : Aspire.Hosting.ApplicationModel.Resource,
      Aspire.Hosting.ApplicationModel.IExpressionValue,
      Aspire.Hosting.ApplicationModel.IManifestExpressionProvider,
      Aspire.Hosting.ApplicationModel.IResource,
      Aspire.Hosting.ApplicationModel.IResourceWithConnectionString,
      Aspire.Hosting.ApplicationModel.IResourceWithParent,
      Aspire.Hosting.ApplicationModel.IResourceWithParent<Aspire.Hosting.ApplicationModel.IOllamaResource>,
      Aspire.Hosting.ApplicationModel.IValueProvider,
      Aspire.Hosting.ApplicationModel.IValueWithReferences
{
    // ...
}
```

## ATS metadata

### ATS export

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

## Constructors

- [OllamaModelResource(string, string, IOllamaResource)](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/ollamamodelresource/constructors.md#constructor-string-string-iollamaresource) -- A resource that represents an ollama model.

## Properties

- [ConnectionStringExpression](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/ollamamodelresource/properties.md#connectionstringexpression) : `ReferenceExpression` `get` -- Gets the connection string expression for the Ollama model.
- [ModelName](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/ollamamodelresource/properties.md#modelname) : `string` `get` -- Gets the model name.
- [Parent](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/ollamamodelresource/properties.md#parent) : [IOllamaResource](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama/iollamaresource.md) `get` -- Gets the parent Ollama resource.
