diff --git a/boards/default_src/micropython/origin/build/lib/ollama.py b/boards/default_src/micropython/origin/build/lib/ollama.py index e13c1bfa..5ecd4a78 100644 --- a/boards/default_src/micropython/origin/build/lib/ollama.py +++ b/boards/default_src/micropython/origin/build/lib/ollama.py @@ -12,6 +12,7 @@ class Ollama(): "Content-Type": "application/json" } self._url = url + self._chat_url = "{}/api/chat".format(self._url) self._max_retries = 1 self._max_history_num = max_history_num self._timeout = 10000 @@ -30,6 +31,7 @@ class Ollama(): def set_custom_url(self, url): self._url = url + self._chat_url = "{}/api/chat".format(self._url) def select_model(self, model_name): self._data["model"] = model_name @@ -57,7 +59,7 @@ class Ollama(): data = json.dumps(self._data).encode('utf-8') for i in range(0, self._max_retries): response = urequests.post( - self._url, headers=self._heads, data=data) + self._chat_url, headers=self._heads, data=data) if response.status_code == 200: break time.sleep(1) diff --git a/boards/default_src/micropython_educore/template.xml b/boards/default_src/micropython_educore/template.xml index 7d1fe7e7..d0abeb61 100644 --- a/boards/default_src/micropython_educore/template.xml +++ b/boards/default_src/micropython_educore/template.xml @@ -7244,7 +7244,7 @@ - 192.168.1.1 + http://192.168.1.1 diff --git a/boards/default_src/micropython_esp32/template.xml b/boards/default_src/micropython_esp32/template.xml index 39bd4adf..885a8ed0 100644 --- a/boards/default_src/micropython_esp32/template.xml +++ b/boards/default_src/micropython_esp32/template.xml @@ -7111,7 +7111,7 @@ - 192.168.1.1 + http://192.168.1.1 diff --git a/boards/default_src/micropython_esp32c2/template.xml b/boards/default_src/micropython_esp32c2/template.xml index bf1aa031..937f1d51 100644 --- a/boards/default_src/micropython_esp32c2/template.xml +++ b/boards/default_src/micropython_esp32c2/template.xml @@ -7003,7 +7003,7 @@ - 192.168.1.1 + http://192.168.1.1 diff --git a/boards/default_src/micropython_esp32c3/template.xml b/boards/default_src/micropython_esp32c3/template.xml index 17d386d4..378c970e 100644 --- a/boards/default_src/micropython_esp32c3/template.xml +++ b/boards/default_src/micropython_esp32c3/template.xml @@ -6917,7 +6917,7 @@ - 192.168.1.1 + http://192.168.1.1 diff --git a/boards/default_src/micropython_esp32s2/template.xml b/boards/default_src/micropython_esp32s2/template.xml index 45e6578a..4ab067a7 100644 --- a/boards/default_src/micropython_esp32s2/template.xml +++ b/boards/default_src/micropython_esp32s2/template.xml @@ -6647,7 +6647,7 @@ - 192.168.1.1 + http://192.168.1.1 diff --git a/boards/default_src/micropython_esp32s3/template.xml b/boards/default_src/micropython_esp32s3/template.xml index c5d025d6..092aa5fd 100644 --- a/boards/default_src/micropython_esp32s3/template.xml +++ b/boards/default_src/micropython_esp32s3/template.xml @@ -7389,7 +7389,7 @@ - 192.168.1.1 + http://192.168.1.1 diff --git a/boards/default_src/micropython_robot/template.xml b/boards/default_src/micropython_robot/template.xml index 2b49c794..b5046f13 100644 --- a/boards/default_src/micropython_robot/template.xml +++ b/boards/default_src/micropython_robot/template.xml @@ -5678,7 +5678,7 @@ - 192.168.1.1 + http://192.168.1.1