> ## Documentation Index
> Fetch the complete documentation index at: https://mintlify.com/n4ze3m/page-assist/llms.txt
> Use this file to discover all available pages before exploring further.

# Ollama

> Set up and configure Ollama with Page Assist

Ollama lets you run large language models locally on your machine. It's the primary and default provider for Page Assist, offering easy installation and model management.

## Prerequisites

* Ollama installed on your system
* At least one model downloaded in Ollama
* Sufficient RAM for your chosen model (typically 8GB+ recommended)

## Installation

If you haven't installed Ollama yet:

<Steps>
  <Step title="Download Ollama">
    Visit [ollama.ai](https://ollama.ai) and download the installer for your operating system.
  </Step>

  <Step title="Install Ollama">
    Run the installer and follow the installation instructions.
  </Step>

  <Step title="Download a Model">
    Open your terminal and download a model:

    ```bash theme={null}
    ollama pull llama3.2
    ```

    Popular models include:

    * `llama3.2` - Meta's latest Llama model
    * `mistral` - Mistral 7B
    * `phi3` - Microsoft's Phi-3
    * `qwen2.5` - Alibaba's Qwen model
  </Step>

  <Step title="Verify Installation">
    Check that Ollama is running:

    ```bash theme={null}
    ollama list
    ```

    This should display your downloaded models.
  </Step>
</Steps>

## Default Configuration

Page Assist automatically detects Ollama running on the default address:

```
http://127.0.0.1:11434
```

No additional configuration is needed if Ollama is running on this default port.

## Custom Ollama URL

If you're running Ollama on a different port or remote server:

<Steps>
  <Step title="Open Settings">
    Click the Page Assist icon in your browser toolbar, then click the Settings icon.
  </Step>

  <Step title="Navigate to Ollama Settings">
    Find the Ollama URL configuration section in the main settings.
  </Step>

  <Step title="Update URL">
    Enter your custom Ollama URL:

    <CodeGroup>
      ```text Custom Port theme={null}
      http://127.0.0.1:11435
      ```

      ```text Remote Server theme={null}
      http://192.168.1.100:11434
      ```

      ```text Hostname theme={null}
      http://ollama-server.local:11434
      ```
    </CodeGroup>
  </Step>

  <Step title="Save Configuration">
    Click Save to apply the changes.
  </Step>
</Steps>

## Multiple Ollama Instances

You can connect to multiple Ollama instances simultaneously:

<Steps>
  <Step title="Open Settings">
    Click the Page Assist icon, then click Settings.
  </Step>

  <Step title="Navigate to OpenAI Compatible API">
    Go to the "OpenAI Compatible API" tab.
  </Step>

  <Step title="Add Provider">
    Click the "Add Provider" button.
  </Step>

  <Step title="Select Ollama">
    Choose "Ollama" from the provider dropdown.
  </Step>

  <Step title="Enter Ollama URL">
    Enter the URL of your additional Ollama instance:

    ```text theme={null}
    http://192.168.1.200:11434
    ```
  </Step>

  <Step title="Save Provider">
    Click Save. Page Assist will automatically fetch available models from this instance.
  </Step>
</Steps>

## Model Selection

Page Assist automatically detects all models available in your Ollama instance.

### Viewing Available Models

Models appear in the model selector dropdown. Page Assist filters out embedding-only models (like `nomic-embed-text`) from the chat model list.

### Setting a Default Model

To set a default model:

1. Open Settings
2. Find "Default Model" configuration
3. Select your preferred model from the dropdown
4. Optionally disable "Ask for model selection every time" to always use the default

### Model Nicknames

You can assign custom names to models for easier identification:

1. Navigate to model management in Settings
2. Select a model
3. Enter a custom nickname
4. The nickname will appear in the model selector

### Disabling Models

To hide specific models from the selector:

1. Go to Settings > Models
2. Find the model you want to hide
3. Toggle it off
4. The model won't appear in model selection but remains in Ollama

## Embedding Models

Page Assist automatically identifies embedding models for RAG (Retrieval-Augmented Generation) features:

```bash theme={null}
# Download an embedding model
ollama pull nomic-embed-text
```

Embedding models are used for:

* Knowledge base search
* Document similarity
* RAG chat features

## Connection Troubleshooting

### Ollama Not Detected

If Page Assist can't connect to Ollama:

<Steps>
  <Step title="Verify Ollama is Running">
    Check if Ollama is running:

    ```bash theme={null}
    ollama list
    ```

    If this fails, start Ollama using your system's application launcher.
  </Step>

  <Step title="Check the URL">
    Ensure the URL in Page Assist settings matches your Ollama address. The default is:

    ```text theme={null}
    http://127.0.0.1:11434
    ```

    Note: Page Assist automatically converts `localhost` to `127.0.0.1`.
  </Step>

  <Step title="Test Connection">
    Open your browser and navigate to:

    ```text theme={null}
    http://127.0.0.1:11434
    ```

    You should see "Ollama is running".
  </Step>

  <Step title="Check Firewall">
    Ensure your firewall isn't blocking port 11434.
  </Step>

  <Step title="Restart Extension">
    Try reloading the Page Assist extension from your browser's extensions page.
  </Step>
</Steps>

### Models Not Appearing

If models don't show up:

1. Verify models are downloaded: `ollama list`
2. Refresh the Page Assist interface
3. Check if Ollama is enabled in Settings
4. Ensure models aren't manually disabled in model management

### Performance Issues

For better performance:

* Use quantized models (e.g., `llama3.2:q4_0`)
* Close other resource-intensive applications
* Consider using smaller models (7B or 3B parameter models)
* Ensure adequate RAM for your model size

## Advanced Configuration

### Custom Model Parameters

You can customize model behavior through Ollama's Modelfile:

```bash theme={null}
# Create a custom model with specific parameters
ollama create mymodel -f Modelfile
```

Example Modelfile:

```
FROM llama3.2
PARAMETER temperature 0.7
PARAMETER top_p 0.9
SYSTEM You are a helpful assistant.
```

### Remote Ollama Setup

To expose Ollama for remote access:

```bash theme={null}
# Set environment variable (Linux/Mac)
export OLLAMA_HOST=0.0.0.0:11434
ollama serve
```

For Windows, set the environment variable in System Properties.

## Best Practices

1. **Keep Models Updated**: Regularly check for model updates using `ollama pull <model>`
2. **Monitor Resources**: Watch RAM usage when running large models
3. **Use Appropriate Sizes**: Match model size to your hardware capabilities
4. **Leverage Multiple Models**: Keep different models for different tasks (coding, chat, etc.)
5. **Clean Up Unused Models**: Remove models you don't use to save disk space: `ollama rm <model>`

## Next Steps

* Explore [Knowledge Base features](/features/knowledge-base) with embedding models
* Learn about [custom prompts](/features/prompts)
* Set up [additional providers](/providers/openai-compatible)
