diff --git a/src/vanna/ollama/ollama.py b/src/vanna/ollama/ollama.py index 90f3c05d..9a7f9b33 100644 --- a/src/vanna/ollama/ollama.py +++ b/src/vanna/ollama/ollama.py @@ -27,7 +27,9 @@ def __init__(self, config=None): if ":" not in self.model: self.model += ":latest" - self.ollama_client = ollama.Client(self.host, timeout=Timeout(240.0)) + self.ollama_timeout = config.get("ollama_timeout", 240.0) + + self.ollama_client = ollama.Client(self.host, timeout=Timeout(self.ollama_timeout)) self.keep_alive = config.get('keep_alive', None) self.ollama_options = config.get('options', {}) self.num_ctx = self.ollama_options.get('num_ctx', 2048)