mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-06-24 20:28:12 +02:00
fix(filesystem): guide structural node reads
This commit is contained in:
parent
beed21647f
commit
c12c2de65b
2 changed files with 13 additions and 1 deletions
|
|
@ -6,6 +6,8 @@ from types import SimpleNamespace
|
|||
from pydantic import BaseModel, ConfigDict
|
||||
|
||||
from pageindex.filesystem.agent import (
|
||||
AGENT_TOOL_POLICY,
|
||||
BASH_TOOL_DESCRIPTION,
|
||||
PIFSAgentStreamObserver,
|
||||
build_agent_model_settings,
|
||||
normalize_agent_stream_mode,
|
||||
|
|
@ -180,6 +182,11 @@ class PIFSAgentStreamTest(unittest.TestCase):
|
|||
|
||||
self.assertEqual(output, '{"answer":"done","document_ids":["dsid_1"]}')
|
||||
|
||||
def test_prompt_tells_agent_when_to_choose_node_or_page(self):
|
||||
self.assertIn("prefer cat <target> --node <node_id>", AGENT_TOOL_POLICY)
|
||||
self.assertIn("page-level evidence", AGENT_TOOL_POLICY)
|
||||
self.assertIn("prefer\ncat <path> --node <node_id>", BASH_TOOL_DESCRIPTION)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
unittest.main()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue