# AddNamedModel

- Module: [CommunityToolkit.Aspire.Hosting.Ollama](/reference/api/go/communitytoolkit.aspire.hosting.ollama.md)
- Version: `13.6.1`
- Kind: `method`
- Defined on: [`OllamaResource`](/reference/api/go/communitytoolkit.aspire.hosting.ollama/ollamaresource.md)
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire/tree/d9c2addac6f527ef2e33712d290b84574b455a3b)

Adds a model to the Ollama resource.

## Remarks

Use this overload when you need to control the generated resource name.

## Definition

```go
func (OllamaResource) AddNamedModel(
    name string,
    modelName string,
) OllamaModelResource
```

## Parameters

- `name` (`string`) -- The name of the resource.
- `modelName` (`string`) -- The name of the LLM to download on initial startup.

## Returns

[`OllamaModelResource`](/reference/api/go/communitytoolkit.aspire.hosting.ollama/ollamamodelresource.md) -- A reference to the `IResourceBuilder`.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`CommunityToolkit_Aspire_Hosting_OllamaOllamaResource`](/reference/api/go/communitytoolkit.aspire.hosting.ollama/communitytoolkit-aspire-hosting-ollamaollamaresource.md)
- [`OllamaExecutableResource`](/reference/api/go/communitytoolkit.aspire.hosting.ollama/ollamaexecutableresource.md)
