# OllamaResource.AddModel

- 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

The resource name is generated from `modelName` when you do not specify one explicitly.

## Definition

```go
func (OllamaResource) AddModel(modelName string) OllamaModelResource
```

## Signature

```go
AddModel(modelName string) OllamaModelResource
```

## Parameters

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