From 4ec90645cea5e0cb72b1ccc2337f8bd15a79ba3a Mon Sep 17 00:00:00 2001 From: dahanzimin <353767514@qq.com> Date: Sun, 9 Mar 2025 20:29:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=20Ollama=E7=9A=84=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- boards/default_src/micropython/origin/build/lib/ollama.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/boards/default_src/micropython/origin/build/lib/ollama.py b/boards/default_src/micropython/origin/build/lib/ollama.py index 5f777a1b..f8f7147b 100644 --- a/boards/default_src/micropython/origin/build/lib/ollama.py +++ b/boards/default_src/micropython/origin/build/lib/ollama.py @@ -4,7 +4,7 @@ import json class Ollama(): - def __init__(self, url="", model=""): + def __init__(self, url="", model="", max_history_num=0): self._heads = { "Accept": "text/event-stream", # "Cache-Control": "no-cache", @@ -13,7 +13,7 @@ class Ollama(): } self._url = url self._max_retries = 1 - self._max_history_num = 0 + self._max_history_num = max_history_num self._timeout = 10000 self._messages = [] self._data = {