mirror of
https://github.com/VectifyAI/PageIndex.git
synced 2026-04-28 09:36:21 +02:00
feat: add PageIndex SDK with local/cloud dual-mode support (#207)
This commit is contained in:
parent
f2dcffc0b7
commit
c7fe93bb56
45 changed files with 4225 additions and 274 deletions
14
tests/test_agent.py
Normal file
14
tests/test_agent.py
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
from pageindex.agent import AgentRunner, SYSTEM_PROMPT
|
||||
from pageindex.backend.protocol import AgentTools
|
||||
|
||||
|
||||
def test_agent_runner_init():
|
||||
tools = AgentTools(function_tools=["mock_tool"])
|
||||
runner = AgentRunner(tools=tools, model="gpt-4o")
|
||||
assert runner._model == "gpt-4o"
|
||||
|
||||
|
||||
def test_system_prompt_has_tool_instructions():
|
||||
assert "list_documents" in SYSTEM_PROMPT
|
||||
assert "get_document_structure" in SYSTEM_PROMPT
|
||||
assert "get_page_content" in SYSTEM_PROMPT
|
||||
Loading…
Add table
Add a link
Reference in a new issue