# addOllamaLocal

- Module: [CommunityToolkit.Aspire.Hosting.Ollama](/reference/api/typescript/communitytoolkit.aspire.hosting.ollama.md)
- Version: `13.4.0`
- Kind: `method`
- Source: [GitHub](https://github.com/CommunityToolkit/Aspire)

Adds an Ollama executable resource to the application model.

## Definition

```typescript
interface IDistributedApplicationBuilder {
  // ... omitted for brevity
  addOllamaLocal(
    name: string,
    port?: number,
    targetPort?: number): OllamaExecutableResource
}
```

## Parameters

- `name` (`string`)
- `port` (`number`) `optional`
- `targetPort` (`number`) `optional`

## Returns

[OllamaExecutableResource](/reference/api/typescript/communitytoolkit.aspire.hosting.ollama/ollamaexecutableresource.md) `builder`

## Applies to

- [IDistributedApplicationBuilder](/reference/api/typescript/communitytoolkit.aspire.hosting.ollama/idistributedapplicationbuilder.md)
