This commit is contained in:
yichuan520030910320
2025-07-21 23:03:52 -07:00
parent 573313f0b6
commit 7fd0a30fee
2 changed files with 11 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
@@ -274,6 +274,14 @@
" Final enriched results: 2 passages\n",
"LEANN Chat response: Python has gained immense popularity significantly more so than C#, becoming one of the most widely used programming languages globally today.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"[leann_backend_hnsw.hnsw_embedding_server LOG]: /Users/yichuan/.local/share/uv/python/cpython-3.11.12-macos-aarch64-none/lib/python3.11/multiprocessing/resource_tracker.py:254: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown\n",
"[leann_backend_hnsw.hnsw_embedding_server LOG]: warnings.warn('resource_tracker: There appear to be %d '\n"
]
}
],
"source": [

View File

@@ -375,8 +375,9 @@ class OllamaChat(LLMInterface):
"stream": False, # Keep it simple for now
"options": kwargs,
}
logger.info(f"Sending request to Ollama: {payload}")
logger.debug(f"Sending request to Ollama: {payload}")
try:
logger.info(f"Sending request to Ollama and waiting for response...")
response = requests.post(full_url, data=json.dumps(payload))
response.raise_for_status()