# ChatOllama

## Prerequisitos

1. Descarga [Ollama](https://github.com/ollama/ollama) o ejecútalo en [Docker.](https://hub.docker.com/r/ollama/ollama)
2. Por ejemplo, puedes usar el siguiente comando para iniciar una instancia de Docker con llama3

   ```bash
   docker run -d -v ollama:/root/.ollama -p 11434:11434 --name ollama ollama/ollama
   docker exec -it ollama ollama run llama3
   ```

## Configuración

1. **Chat Models** > arrastra el nodo **ChatOllama**

<figure><img src="/files/cQ2JJkvu1hfGTaYZgO7z" alt="" width="563"><figcaption></figcaption></figure>

2. Completa el modelo que se está ejecutando en Ollama. Por ejemplo: `llama2`. También puedes usar parámetros adicionales:

<figure><img src="/files/9wtztfP6sZZFVZB0j4bx" alt=""><figcaption></figcaption></figure>

3. ¡Voilà [🎉](https://emojipedia.org/party-popper/), ahora puedes usar el **nodo ChatOllama** en Flowise

<figure><img src="/files/7Y33ejCKqFfjB4Di9OYz" alt=""><figcaption></figcaption></figure>

### Adicional

Si estás ejecutando tanto Flowise como Ollama en docker, tendrás que cambiar la URL Base para ChatOllama.

Para sistemas operativos Windows y MacOS, especifica [http://host.docker.internal:8000](http://host.docker.internal:8000/). Para sistemas basados en Linux, se debe usar el gateway predeterminado de docker ya que host.docker.internal no está disponible: [http://172.17.0.1:8000](http://172.17.0.1:8000/)

<figure><img src="/files/Ims4Nucphrb3uQZEuu4x" alt="" width="292"><figcaption></figcaption></figure>

## Recursos

* [LangchainJS ChatOllama](https://js.langchain.com/docs/integrations/chat/ollama)
* [Ollama](https://github.com/ollama/ollama)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flowiseai.com/espanol/documentacion-oficial/integraciones/langchain/chat-models/chatollama.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
