# OllamaResource.AddNamedModel

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

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
```

## Signature

```go
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()`.

## Defined on

A marker interface declares no methods of its own in Go. Its functions are declared on the concrete types they apply to.

- [OllamaResource](/reference/api/go/communitytoolkit.aspire.hosting.ollama/ollamaresource.md) -- `marker`

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