|
AQIT 0.1.0
|
Functions | |
| str | _load_system_prompt (dict[str, Any] state) |
| list[dict[str, Any]] | _build_tools_schema (dict[str, Any] state) |
| None | run_agent_turn (str session_id, str user_message, dict[str, Any] state, str api_key, str base_url, Callable[[str], None]|None on_token=None, Callable[[str, dict], None]|None on_tool_start=None, Callable[[str, Any, bool], None]|None on_tool_result=None) |
Variables | |
| str | _SYSTEM_PROMPT_PATH = Path(__file__).parent / "prompts" / "system.txt" |
|
protected |
Return OpenAI-format tool definitions for the active session mode.
Definition at line 63 of file agent.py.
Referenced by run_agent_turn().
|
protected |
Definition at line 22 of file agent.py.
Referenced by run_agent_turn().
| None run_agent_turn | ( | str | session_id, |
| str | user_message, | ||
| dict[str, Any] | state, | ||
| str | api_key, | ||
| str | base_url, | ||
| Callable[[str], None] | None | on_token = None, | ||
| Callable[[str, dict], None] | None | on_tool_start = None, | ||
| Callable[[str, Any, bool], None] | None | on_tool_result = None ) |
Run one user turn through the orchestrator loop. Streams text as message.append events and dispatches tool calls via the registry, pushing tool.start + tool.result for each. Loops until the model stops requesting tool calls.
Definition at line 83 of file agent.py.
References _build_tools_schema(), and _load_system_prompt().