UI更新、新增本地适配

This commit is contained in:
YILING0013
2025-02-02 19:22:54 +08:00
parent 4b8ceffc01
commit bc6e2ff869
3 changed files with 23 additions and 32 deletions
+2 -1
View File
@@ -1,5 +1,6 @@
# embedding_ollama.py
import requests
import traceback
from typing import List
class OllamaEmbeddings:
@@ -51,4 +52,4 @@ class OllamaEmbeddings:
raise ValueError("No 'embedding' field in Ollama response.")
return result["embedding"]
except requests.exceptions.RequestException as e:
raise Exception(f"Ollama embeddings request error: {e}")
raise Exception(f"Ollama embeddings request error: {e}\n{traceback.format_exc()}")