{
  "data": {
    "id": "OllamaModel-eCsJx",
    "node": {
      "base_classes": ["LanguageModel", "Message"],
      "beta": false,
      "conditional_paths": [],
      "custom_fields": {},
      "description": "Generate text using Ollama Local LLMs.",
      "display_name": "Ollama",
      "documentation": "",
      "edited": false,
      "field_order": [
        "base_url",
        "model_name",
        "temperature",
        "format",
        "metadata",
        "mirostat",
        "mirostat_eta",
        "mirostat_tau",
        "num_ctx",
        "num_gpu",
        "num_thread",
        "repeat_last_n",
        "repeat_penalty",
        "tfs_z",
        "timeout",
        "top_k",
        "top_p",
        "verbose",
        "tags",
        "stop_tokens",
        "system",
        "tool_model_enabled",
        "template",
        "input_value",
        "system_message",
        "stream"
      ],
      "frozen": false,
      "icon": "Ollama",
      "last_updated": "2025-09-17T20:01:59.191Z",
      "legacy": false,
      "metadata": {
        "code_hash": "af399d429d23",
        "dependencies": {
          "dependencies": [
            {
              "name": "httpx",
              "version": "0.28.1"
            },
            {
              "name": "langchain_ollama",
              "version": "0.2.1"
            },
            {
              "name": "langflow",
              "version": "1.5.0.post2"
            }
          ],
          "total_dependencies": 3
        },
        "keywords": ["model", "llm", "language model", "large language model"],
        "module": "langflow.components.ollama.ollama.ChatOllamaComponent"
      },
      "minimized": false,
      "output_types": [],
      "outputs": [
        {
          "allows_loop": false,
          "cache": true,
          "display_name": "Model Response",
          "group_outputs": false,
          "method": "text_response",
          "name": "text_output",
          "options": null,
          "required_inputs": null,
          "tool_mode": true,
          "types": ["Message"],
          "value": "__UNDEFINED__"
        },
        {
          "allows_loop": false,
          "cache": true,
          "display_name": "Language Model",
          "group_outputs": false,
          "method": "build_model",
          "name": "model_output",
          "options": null,
          "required_inputs": null,
          "selected": "LanguageModel",
          "tool_mode": true,
          "types": ["LanguageModel"],
          "value": "__UNDEFINED__"
        }
      ],
      "pinned": false,
      "template": {
        "_type": "Component",
        "base_url": {
          "_input_type": "MessageTextInput",
          "advanced": false,
          "display_name": "Base URL",
          "dynamic": false,
          "info": "Endpoint of the Ollama API.",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "name": "base_url",
          "placeholder": "",
          "real_time_refresh": true,
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "code": {
          "advanced": true,
          "dynamic": true,
          "fileTypes": [],
          "file_path": "",
          "info": "",
          "list": false,
          "load_from_db": false,
          "multiline": true,
          "name": "code",
          "password": false,
          "placeholder": "",
          "required": true,
          "show": true,
          "title_case": false,
          "type": "code",
          "value": "import asyncio\nfrom typing import Any\nfrom urllib.parse import urljoin\n\nimport httpx\nfrom langchain_ollama import ChatOllama\n\nfrom langflow.base.models.model import LCModelComponent\nfrom langflow.base.models.ollama_constants import URL_LIST\nfrom langflow.field_typing import LanguageModel\nfrom langflow.field_typing.range_spec import RangeSpec\nfrom langflow.io import BoolInput, DictInput, DropdownInput, FloatInput, IntInput, MessageTextInput, SliderInput\nfrom langflow.logging import logger\n\nHTTP_STATUS_OK = 200\n\n\nclass ChatOllamaComponent(LCModelComponent):\n    display_name = \"Ollama\"\n    description = \"Generate text using Ollama Local LLMs.\"\n    icon = \"Ollama\"\n    name = \"OllamaModel\"\n\n    # Define constants for JSON keys\n    JSON_MODELS_KEY = \"models\"\n    JSON_NAME_KEY = \"name\"\n    JSON_CAPABILITIES_KEY = \"capabilities\"\n    DESIRED_CAPABILITY = \"completion\"\n    TOOL_CALLING_CAPABILITY = \"tools\"\n\n    inputs = [\n        MessageTextInput(\n            name=\"base_url\",\n            display_name=\"Base URL\",\n            info=\"Endpoint of the Ollama API.\",\n            value=\"\",\n            real_time_refresh=True,\n        ),\n        DropdownInput(\n            name=\"model_name\",\n            display_name=\"Model Name\",\n            options=[],\n            info=\"Refer to https://ollama.com/library for more models.\",\n            refresh_button=True,\n            real_time_refresh=True,\n        ),\n        SliderInput(\n            name=\"temperature\",\n            display_name=\"Temperature\",\n            value=0.1,\n            range_spec=RangeSpec(min=0, max=1, step=0.01),\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"format\", display_name=\"Format\", info=\"Specify the format of the output (e.g., json).\", advanced=True\n        ),\n        DictInput(name=\"metadata\", display_name=\"Metadata\", info=\"Metadata to add to the run trace.\", advanced=True),\n        DropdownInput(\n            name=\"mirostat\",\n            display_name=\"Mirostat\",\n            options=[\"Disabled\", \"Mirostat\", \"Mirostat 2.0\"],\n            info=\"Enable/disable Mirostat sampling for controlling perplexity.\",\n            value=\"Disabled\",\n            advanced=True,\n            real_time_refresh=True,\n        ),\n        FloatInput(\n            name=\"mirostat_eta\",\n            display_name=\"Mirostat Eta\",\n            info=\"Learning rate for Mirostat algorithm. (Default: 0.1)\",\n            advanced=True,\n        ),\n        FloatInput(\n            name=\"mirostat_tau\",\n            display_name=\"Mirostat Tau\",\n            info=\"Controls the balance between coherence and diversity of the output. (Default: 5.0)\",\n            advanced=True,\n        ),\n        IntInput(\n            name=\"num_ctx\",\n            display_name=\"Context Window Size\",\n            info=\"Size of the context window for generating tokens. (Default: 2048)\",\n            advanced=True,\n        ),\n        IntInput(\n            name=\"num_gpu\",\n            display_name=\"Number of GPUs\",\n            info=\"Number of GPUs to use for computation. (Default: 1 on macOS, 0 to disable)\",\n            advanced=True,\n        ),\n        IntInput(\n            name=\"num_thread\",\n            display_name=\"Number of Threads\",\n            info=\"Number of threads to use during computation. (Default: detected for optimal performance)\",\n            advanced=True,\n        ),\n        IntInput(\n            name=\"repeat_last_n\",\n            display_name=\"Repeat Last N\",\n            info=\"How far back the model looks to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx)\",\n            advanced=True,\n        ),\n        FloatInput(\n            name=\"repeat_penalty\",\n            display_name=\"Repeat Penalty\",\n            info=\"Penalty for repetitions in generated text. (Default: 1.1)\",\n            advanced=True,\n        ),\n        FloatInput(name=\"tfs_z\", display_name=\"TFS Z\", info=\"Tail free sampling value. (Default: 1)\", advanced=True),\n        IntInput(name=\"timeout\", display_name=\"Timeout\", info=\"Timeout for the request stream.\", advanced=True),\n        IntInput(\n            name=\"top_k\", display_name=\"Top K\", info=\"Limits token selection to top K. (Default: 40)\", advanced=True\n        ),\n        FloatInput(name=\"top_p\", display_name=\"Top P\", info=\"Works together with top-k. (Default: 0.9)\", advanced=True),\n        BoolInput(name=\"verbose\", display_name=\"Verbose\", info=\"Whether to print out response text.\", advanced=True),\n        MessageTextInput(\n            name=\"tags\",\n            display_name=\"Tags\",\n            info=\"Comma-separated list of tags to add to the run trace.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"stop_tokens\",\n            display_name=\"Stop Tokens\",\n            info=\"Comma-separated list of tokens to signal the model to stop generating text.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"system\", display_name=\"System\", info=\"System to use for generating text.\", advanced=True\n        ),\n        BoolInput(\n            name=\"tool_model_enabled\",\n            display_name=\"Tool Model Enabled\",\n            info=\"Whether to enable tool calling in the model.\",\n            value=True,\n            real_time_refresh=True,\n        ),\n        MessageTextInput(\n            name=\"template\", display_name=\"Template\", info=\"Template to use for generating text.\", advanced=True\n        ),\n        *LCModelComponent._base_inputs,\n    ]\n\n    def build_model(self) -> LanguageModel:  # type: ignore[type-var]\n        # Mapping mirostat settings to their corresponding values\n        mirostat_options = {\"Mirostat\": 1, \"Mirostat 2.0\": 2}\n\n        # Default to 0 for 'Disabled'\n        mirostat_value = mirostat_options.get(self.mirostat, 0)\n\n        # Set mirostat_eta and mirostat_tau to None if mirostat is disabled\n        if mirostat_value == 0:\n            mirostat_eta = None\n            mirostat_tau = None\n        else:\n            mirostat_eta = self.mirostat_eta\n            mirostat_tau = self.mirostat_tau\n\n        # Mapping system settings to their corresponding values\n        llm_params = {\n            \"base_url\": self.base_url,\n            \"model\": self.model_name,\n            \"mirostat\": mirostat_value,\n            \"format\": self.format,\n            \"metadata\": self.metadata,\n            \"tags\": self.tags.split(\",\") if self.tags else None,\n            \"mirostat_eta\": mirostat_eta,\n            \"mirostat_tau\": mirostat_tau,\n            \"num_ctx\": self.num_ctx or None,\n            \"num_gpu\": self.num_gpu or None,\n            \"num_thread\": self.num_thread or None,\n            \"repeat_last_n\": self.repeat_last_n or None,\n            \"repeat_penalty\": self.repeat_penalty or None,\n            \"temperature\": self.temperature or None,\n            \"stop\": self.stop_tokens.split(\",\") if self.stop_tokens else None,\n            \"system\": self.system,\n            \"tfs_z\": self.tfs_z or None,\n            \"timeout\": self.timeout or None,\n            \"top_k\": self.top_k or None,\n            \"top_p\": self.top_p or None,\n            \"verbose\": self.verbose,\n            \"template\": self.template,\n        }\n\n        # Remove parameters with None values\n        llm_params = {k: v for k, v in llm_params.items() if v is not None}\n\n        try:\n            output = ChatOllama(**llm_params)\n        except Exception as e:\n            msg = (\n                \"Unable to connect to the Ollama API. \",\n                \"Please verify the base URL, ensure the relevant Ollama model is pulled, and try again.\",\n            )\n            raise ValueError(msg) from e\n\n        return output\n\n    async def is_valid_ollama_url(self, url: str) -> bool:\n        try:\n            async with httpx.AsyncClient() as client:\n                return (await client.get(urljoin(url, \"api/tags\"))).status_code == HTTP_STATUS_OK\n        except httpx.RequestError:\n            return False\n\n    async def update_build_config(self, build_config: dict, field_value: Any, field_name: str | None = None):\n        if field_name == \"mirostat\":\n            if field_value == \"Disabled\":\n                build_config[\"mirostat_eta\"][\"advanced\"] = True\n                build_config[\"mirostat_tau\"][\"advanced\"] = True\n                build_config[\"mirostat_eta\"][\"value\"] = None\n                build_config[\"mirostat_tau\"][\"value\"] = None\n\n            else:\n                build_config[\"mirostat_eta\"][\"advanced\"] = False\n                build_config[\"mirostat_tau\"][\"advanced\"] = False\n\n                if field_value == \"Mirostat 2.0\":\n                    build_config[\"mirostat_eta\"][\"value\"] = 0.2\n                    build_config[\"mirostat_tau\"][\"value\"] = 10\n                else:\n                    build_config[\"mirostat_eta\"][\"value\"] = 0.1\n                    build_config[\"mirostat_tau\"][\"value\"] = 5\n\n        if field_name in {\"base_url\", \"model_name\"}:\n            if build_config[\"base_url\"].get(\"load_from_db\", False):\n                base_url_value = await self.get_variables(build_config[\"base_url\"].get(\"value\", \"\"), \"base_url\")\n            else:\n                base_url_value = build_config[\"base_url\"].get(\"value\", \"\")\n\n            if not await self.is_valid_ollama_url(base_url_value):\n                # Check if any URL in the list is valid\n                valid_url = \"\"\n                check_urls = URL_LIST\n                if self.base_url:\n                    check_urls = [self.base_url, *URL_LIST]\n                for url in check_urls:\n                    if await self.is_valid_ollama_url(url):\n                        valid_url = url\n                        break\n                if valid_url != \"\":\n                    build_config[\"base_url\"][\"value\"] = valid_url\n                else:\n                    msg = \"No valid Ollama URL found.\"\n                    raise ValueError(msg)\n        if field_name in {\"model_name\", \"base_url\", \"tool_model_enabled\"}:\n            if await self.is_valid_ollama_url(self.base_url):\n                tool_model_enabled = build_config[\"tool_model_enabled\"].get(\"value\", False) or self.tool_model_enabled\n                build_config[\"model_name\"][\"options\"] = await self.get_models(\n                    self.base_url, tool_model_enabled=tool_model_enabled\n                )\n            elif await self.is_valid_ollama_url(build_config[\"base_url\"].get(\"value\", \"\")):\n                tool_model_enabled = build_config[\"tool_model_enabled\"].get(\"value\", False) or self.tool_model_enabled\n                build_config[\"model_name\"][\"options\"] = await self.get_models(\n                    build_config[\"base_url\"].get(\"value\", \"\"), tool_model_enabled=tool_model_enabled\n                )\n            else:\n                build_config[\"model_name\"][\"options\"] = []\n        if field_name == \"keep_alive_flag\":\n            if field_value == \"Keep\":\n                build_config[\"keep_alive\"][\"value\"] = \"-1\"\n                build_config[\"keep_alive\"][\"advanced\"] = True\n            elif field_value == \"Immediately\":\n                build_config[\"keep_alive\"][\"value\"] = \"0\"\n                build_config[\"keep_alive\"][\"advanced\"] = True\n            else:\n                build_config[\"keep_alive\"][\"advanced\"] = False\n\n        return build_config\n\n    async def get_models(self, base_url_value: str, *, tool_model_enabled: bool | None = None) -> list[str]:\n        \"\"\"Fetches a list of models from the Ollama API that do not have the \"embedding\" capability.\n\n        Args:\n            base_url_value (str): The base URL of the Ollama API.\n            tool_model_enabled (bool | None, optional): If True, filters the models further to include\n                only those that support tool calling. Defaults to None.\n\n        Returns:\n            list[str]: A list of model names that do not have the \"embedding\" capability. If\n                `tool_model_enabled` is True, only models supporting tool calling are included.\n\n        Raises:\n            ValueError: If there is an issue with the API request or response, or if the model\n                names cannot be retrieved.\n        \"\"\"\n        try:\n            # Normalize the base URL to avoid the repeated \"/\" at the end\n            base_url = base_url_value.rstrip(\"/\") + \"/\"\n\n            # Ollama REST API to return models\n            tags_url = urljoin(base_url, \"api/tags\")\n\n            # Ollama REST API to return model capabilities\n            show_url = urljoin(base_url, \"api/show\")\n\n            async with httpx.AsyncClient() as client:\n                # Fetch available models\n                tags_response = await client.get(tags_url)\n                tags_response.raise_for_status()\n                models = tags_response.json()\n                if asyncio.iscoroutine(models):\n                    models = await models\n                await logger.adebug(f\"Available models: {models}\")\n\n                # Filter models that are NOT embedding models\n                model_ids = []\n                for model in models[self.JSON_MODELS_KEY]:\n                    model_name = model[self.JSON_NAME_KEY]\n                    await logger.adebug(f\"Checking model: {model_name}\")\n\n                    payload = {\"model\": model_name}\n                    show_response = await client.post(show_url, json=payload)\n                    show_response.raise_for_status()\n                    json_data = show_response.json()\n                    if asyncio.iscoroutine(json_data):\n                        json_data = await json_data\n                    capabilities = json_data.get(self.JSON_CAPABILITIES_KEY, [])\n                    await logger.adebug(f\"Model: {model_name}, Capabilities: {capabilities}\")\n\n                    if self.DESIRED_CAPABILITY in capabilities and (\n                        not tool_model_enabled or self.TOOL_CALLING_CAPABILITY in capabilities\n                    ):\n                        model_ids.append(model_name)\n\n        except (httpx.RequestError, ValueError) as e:\n            msg = \"Could not get model names from Ollama.\"\n            raise ValueError(msg) from e\n\n        return model_ids\n"
        },
        "format": {
          "_input_type": "MessageTextInput",
          "advanced": true,
          "display_name": "Format",
          "dynamic": false,
          "info": "Specify the format of the output (e.g., json).",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "name": "format",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "input_value": {
          "_input_type": "MessageInput",
          "advanced": false,
          "display_name": "Input",
          "dynamic": false,
          "info": "",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "name": "input_value",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "metadata": {
          "_input_type": "DictInput",
          "advanced": true,
          "display_name": "Metadata",
          "dynamic": false,
          "info": "Metadata to add to the run trace.",
          "list": false,
          "list_add_label": "Add More",
          "name": "metadata",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "type": "dict",
          "value": {}
        },
        "mirostat": {
          "_input_type": "DropdownInput",
          "advanced": true,
          "combobox": false,
          "dialog_inputs": {},
          "display_name": "Mirostat",
          "dynamic": false,
          "info": "Enable/disable Mirostat sampling for controlling perplexity.",
          "name": "mirostat",
          "options": ["Disabled", "Mirostat", "Mirostat 2.0"],
          "options_metadata": [],
          "placeholder": "",
          "real_time_refresh": true,
          "required": false,
          "show": true,
          "title_case": false,
          "toggle": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "str",
          "value": "Disabled"
        },
        "mirostat_eta": {
          "_input_type": "FloatInput",
          "advanced": true,
          "display_name": "Mirostat Eta",
          "dynamic": false,
          "info": "Learning rate for Mirostat algorithm. (Default: 0.1)",
          "list": false,
          "list_add_label": "Add More",
          "name": "mirostat_eta",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "float",
          "value": ""
        },
        "mirostat_tau": {
          "_input_type": "FloatInput",
          "advanced": true,
          "display_name": "Mirostat Tau",
          "dynamic": false,
          "info": "Controls the balance between coherence and diversity of the output. (Default: 5.0)",
          "list": false,
          "list_add_label": "Add More",
          "name": "mirostat_tau",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "float",
          "value": ""
        },
        "model_name": {
          "_input_type": "DropdownInput",
          "advanced": false,
          "combobox": false,
          "dialog_inputs": {},
          "display_name": "Model Name",
          "dynamic": false,
          "info": "Refer to https://ollama.com/library for more models.",
          "name": "model_name",
          "options": [],
          "options_metadata": [],
          "placeholder": "",
          "real_time_refresh": true,
          "refresh_button": true,
          "required": false,
          "show": true,
          "title_case": false,
          "toggle": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "num_ctx": {
          "_input_type": "IntInput",
          "advanced": true,
          "display_name": "Context Window Size",
          "dynamic": false,
          "info": "Size of the context window for generating tokens. (Default: 2048)",
          "list": false,
          "list_add_label": "Add More",
          "name": "num_ctx",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "int",
          "value": ""
        },
        "num_gpu": {
          "_input_type": "IntInput",
          "advanced": true,
          "display_name": "Number of GPUs",
          "dynamic": false,
          "info": "Number of GPUs to use for computation. (Default: 1 on macOS, 0 to disable)",
          "list": false,
          "list_add_label": "Add More",
          "name": "num_gpu",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "int",
          "value": ""
        },
        "num_thread": {
          "_input_type": "IntInput",
          "advanced": true,
          "display_name": "Number of Threads",
          "dynamic": false,
          "info": "Number of threads to use during computation. (Default: detected for optimal performance)",
          "list": false,
          "list_add_label": "Add More",
          "name": "num_thread",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "int",
          "value": ""
        },
        "repeat_last_n": {
          "_input_type": "IntInput",
          "advanced": true,
          "display_name": "Repeat Last N",
          "dynamic": false,
          "info": "How far back the model looks to prevent repetition. (Default: 64, 0 = disabled, -1 = num_ctx)",
          "list": false,
          "list_add_label": "Add More",
          "name": "repeat_last_n",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "int",
          "value": ""
        },
        "repeat_penalty": {
          "_input_type": "FloatInput",
          "advanced": true,
          "display_name": "Repeat Penalty",
          "dynamic": false,
          "info": "Penalty for repetitions in generated text. (Default: 1.1)",
          "list": false,
          "list_add_label": "Add More",
          "name": "repeat_penalty",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "float",
          "value": ""
        },
        "stop_tokens": {
          "_input_type": "MessageTextInput",
          "advanced": true,
          "display_name": "Stop Tokens",
          "dynamic": false,
          "info": "Comma-separated list of tokens to signal the model to stop generating text.",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "name": "stop_tokens",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "stream": {
          "_input_type": "BoolInput",
          "advanced": true,
          "display_name": "Stream",
          "dynamic": false,
          "info": "Stream the response from the model. Streaming works only in Chat.",
          "list": false,
          "list_add_label": "Add More",
          "name": "stream",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "bool",
          "value": false
        },
        "system": {
          "_input_type": "MessageTextInput",
          "advanced": true,
          "display_name": "System",
          "dynamic": false,
          "info": "System to use for generating text.",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "name": "system",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "system_message": {
          "_input_type": "MultilineInput",
          "advanced": false,
          "copy_field": false,
          "display_name": "System Message",
          "dynamic": false,
          "info": "System message to pass to the model.",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "multiline": true,
          "name": "system_message",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "tags": {
          "_input_type": "MessageTextInput",
          "advanced": true,
          "display_name": "Tags",
          "dynamic": false,
          "info": "Comma-separated list of tags to add to the run trace.",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "name": "tags",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "temperature": {
          "_input_type": "SliderInput",
          "advanced": true,
          "display_name": "Temperature",
          "dynamic": false,
          "info": "",
          "max_label": "",
          "max_label_icon": "",
          "min_label": "",
          "min_label_icon": "",
          "name": "temperature",
          "placeholder": "",
          "range_spec": {
            "max": 1,
            "min": 0,
            "step": 0.01,
            "step_type": "float"
          },
          "required": false,
          "show": true,
          "slider_buttons": false,
          "slider_buttons_options": [],
          "slider_input": false,
          "title_case": false,
          "tool_mode": false,
          "type": "slider",
          "value": 0.1
        },
        "template": {
          "_input_type": "MessageTextInput",
          "advanced": true,
          "display_name": "Template",
          "dynamic": false,
          "info": "Template to use for generating text.",
          "input_types": ["Message"],
          "list": false,
          "list_add_label": "Add More",
          "load_from_db": false,
          "name": "template",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_input": true,
          "trace_as_metadata": true,
          "type": "str",
          "value": ""
        },
        "tfs_z": {
          "_input_type": "FloatInput",
          "advanced": true,
          "display_name": "TFS Z",
          "dynamic": false,
          "info": "Tail free sampling value. (Default: 1)",
          "list": false,
          "list_add_label": "Add More",
          "name": "tfs_z",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "float",
          "value": ""
        },
        "timeout": {
          "_input_type": "IntInput",
          "advanced": true,
          "display_name": "Timeout",
          "dynamic": false,
          "info": "Timeout for the request stream.",
          "list": false,
          "list_add_label": "Add More",
          "name": "timeout",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "int",
          "value": ""
        },
        "tool_model_enabled": {
          "_input_type": "BoolInput",
          "advanced": false,
          "display_name": "Tool Model Enabled",
          "dynamic": false,
          "info": "Whether to enable tool calling in the model.",
          "list": false,
          "list_add_label": "Add More",
          "name": "tool_model_enabled",
          "placeholder": "",
          "real_time_refresh": true,
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "bool",
          "value": true
        },
        "top_k": {
          "_input_type": "IntInput",
          "advanced": true,
          "display_name": "Top K",
          "dynamic": false,
          "info": "Limits token selection to top K. (Default: 40)",
          "list": false,
          "list_add_label": "Add More",
          "name": "top_k",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "int",
          "value": ""
        },
        "top_p": {
          "_input_type": "FloatInput",
          "advanced": true,
          "display_name": "Top P",
          "dynamic": false,
          "info": "Works together with top-k. (Default: 0.9)",
          "list": false,
          "list_add_label": "Add More",
          "name": "top_p",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "float",
          "value": ""
        },
        "verbose": {
          "_input_type": "BoolInput",
          "advanced": true,
          "display_name": "Verbose",
          "dynamic": false,
          "info": "Whether to print out response text.",
          "list": false,
          "list_add_label": "Add More",
          "name": "verbose",
          "placeholder": "",
          "required": false,
          "show": true,
          "title_case": false,
          "tool_mode": false,
          "trace_as_metadata": true,
          "type": "bool",
          "value": false
        }
      },
      "tool_mode": false
    },
    "selected_output": "model_output",
    "showNode": true,
    "type": "OllamaModel"
  },
  "id": "OllamaModel-eCsJx",
  "measured": {
    "height": 494,
    "width": 320
  },
  "position": {
    "x": 554,
    "y": 225
  },
  "selected": false,
  "type": "genericNode"
}
