← Về thư mục
- _last_fenced · function · L35-L40 — def _last_fenced(text: str, label_pattern: str) -> str | None
- _openai_tool_results_by_id · function · L43-L52 — def _openai_tool_results_by_id(messages: list[dict[str, Any]]) -> dict[str, dict[str, Any]]
- _openai_tool_result_is_error · function · L55-L73 — def _openai_tool_result_is_error(tool_msg: dict[str, Any] | None) -> bool
- _last_run_sql_openai · function · L76-L108 — def _last_run_sql_openai(messages: list[dict[str, Any]]) -> str | None
- _anthropic_tool_results_by_id · function · L111-L124 — def _anthropic_tool_results_by_id(messages: list[dict[str, Any]]) -> dict[str, dict[str, Any]]
- _last_run_sql_anthropic · function · L127-L151 — def _last_run_sql_anthropic(messages: list[dict[str, Any]]) -> str | None
- _walk_messages_for_run_sql · function · L154-L164 — def _walk_messages_for_run_sql( messages: Iterable[dict[str, Any]] | None, *, message_format: str, ) -> str | None
- extract_agent_sql · function · L167-L190 — def extract_agent_sql( *, final_text: str, messages: list[dict[str, Any]] | None, message_format: str = "openai", ) -> tuple[str, str]