feat: add TTLCache for get_cache_version and TEMPLATE_AUTO_RELOAD config with Makefile worker count variables

This commit is contained in:
2026-06-14 14:46:36 +00:00
parent c151325916
commit d75d5dc6a8
149 changed files with 9811 additions and 262 deletions
+3 -4
View File
@@ -1,7 +1,6 @@
# retoor <retoor@molodetz.nl>
import asyncio
from tests.conftest import run_async
from devplacepy.services.deepsearch import chat as chat_module
from devplacepy.services.deepsearch.chat import DeepsearchChat
from devplacepy.services.deepsearch.embeddings import local_embed
@@ -32,7 +31,7 @@ def test_answer_is_grounded_and_cited(monkeypatch):
monkeypatch.setattr(chat_module, "complete_chat", fake_complete)
chat = DeepsearchChat(collection, "k")
answer = asyncio.run(chat.answer("where was the transistor invented"))
answer = run_async(chat.answer("where was the transistor invented"))
assert "Bell Labs" in answer.text
assert answer.citations
assert answer.citations[0]["url"].startswith("https://")
@@ -48,7 +47,7 @@ def test_answer_when_no_chunks(monkeypatch):
monkeypatch.setattr(chat_module, "embed_texts", fake_embed)
chat = DeepsearchChat(collection, "k")
answer = asyncio.run(chat.answer("anything"))
answer = run_async(chat.answer("anything"))
assert answer.citations == []
assert "did not capture" in answer.text
finally: