From 64d8e7c3b6386d79dd39c5a1d5f336ee941992d5 Mon Sep 17 00:00:00 2001 From: ftoppi Date: Tue, 9 Apr 2024 22:28:02 +0200 Subject: [PATCH] smart_scraper_local.py: Allow using a remote Ollama #53 Since you pass `config["llm"]` to langchain ChatOllama(), it's only a matter of adding a new parameter `base_url`. --- examples/local/smart_scraper_local.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/local/smart_scraper_local.py b/examples/local/smart_scraper_local.py index 2ef08e38..0869ae48 100644 --- a/examples/local/smart_scraper_local.py +++ b/examples/local/smart_scraper_local.py @@ -20,7 +20,8 @@ graph_config = { "model": "ollama/mistral", "temperature": 0, "format": "json", # Ollama needs the format to be specified explicitly - # "model_tokens": 2000, # set context length arbitrarily + # "model_tokens": 2000, # set context length arbitrarily, + # "base_url": "http://ollama:11434", # set ollama URL arbitrarily }, }