feat(nav): enforce strict embedding length guards and autonomous brain-first navigation
This commit is contained in:
@@ -125,10 +125,10 @@ class QdrantBase:
|
||||
if key:
|
||||
headers["Authorization"] = f"Bearer {key}"
|
||||
# OpenAI/OpenRouter use 'input' instead of 'prompt'
|
||||
payload = {"model": model, "input": str(text)[:8000]}
|
||||
payload = {"model": model, "input": str(text)[:2000]}
|
||||
else:
|
||||
# Local Ollama
|
||||
payload = {"model": model, "prompt": str(text)[:8000]}
|
||||
payload = {"model": model, "prompt": str(text)[:2000]}
|
||||
|
||||
# Log to prevent user from thinking the bot is hung during model swap in VRAM
|
||||
if not getattr(self, "_has_logged_embedding", False):
|
||||
@@ -361,7 +361,7 @@ class UIMemoryDB(QdrantBase):
|
||||
sig = re.sub(r"\s+", " ", sig).strip()
|
||||
|
||||
# 3. Strict truncation for nomic-embed-text context window
|
||||
return sig[:4000]
|
||||
return sig[:2000]
|
||||
|
||||
def _deterministic_id(self, intent: str) -> str:
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user