MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / fake_answer_question

Function fake_answer_question

tests/test_desktop_gui.py:688–706  ·  view source on GitHub ↗
(user_id, question, *, limit=8, pinned_nodes=None, **_kwargs)

Source from the content-addressed store, hash-verified

686 monkeypatch.setattr(agents.wiki_db, "search_nodes", lambda user_id, query, limit=5, node_type=None: [selected_node])
687
688 def fake_answer_question(user_id, question, *, limit=8, pinned_nodes=None, **_kwargs):
689 captured["question"] = question
690 captured["limit"] = limit
691 captured["pinned_nodes"] = pinned_nodes or []
692 return {
693 "text": "结构化记忆方法更强调长期证据槽。[1]",
694 "citations": [
695 {
696 "index": 1,
697 "node_id": selected_node["node_id"],
698 "title": selected_node["title"],
699 "node_type": selected_node["node_type"],
700 "excerpt": "Memory slots improve grounded retrieval.",
701 "source_type": "reading_report",
702 "source_id": "report-1",
703 "metadata": selected_node["metadata"],
704 }
705 ],
706 }
707
708 monkeypatch.setattr(agents.wiki_answer, "answer_question", fake_answer_question)
709

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected