# OllamaModelResource

- Kind: `class`
- Package: [CommunityToolkit.Aspire.Hosting.Ollama](/reference/api/csharp/communitytoolkit.aspire.hosting.ollama.md)
- Version: `13.1.1`
- Namespace: `Aspire.Hosting.ApplicationModel`
- Target framework: `net10.0`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/blob/67afcca30f02c18687f9c5219313710af9706630/src/CommunityToolkit.Aspire.Hosting.Ollama/OllamaModelResource.cs)
- Inherits: `Resource`
- Implements: `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.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
{
    // ...
}
```

## 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.
