Repository navigation
Conversation
kennethbruskiewicz
left a comment
There was a problem hiding this comment.
This is a nice simplification. Four near-identical functions become one, and the notebook is updated to match. It merges cleanly with main, though the branch is 11 commits behind.
I checked for callers of the four removed functions (query_aragorn_pathfinder, query_arax_pathfinder and their _with_constraints forms). There are none in the toolkit, its tests, text-query or translator-agents. They were public, so notebook users outside the repository may still call them. Thin aliases that call query_pathfinder would avoid breaking those users, or the removal could go in the release notes requested in #61.
Three small inline comments follow. None of them blocks merging. #68 wraps the four old functions for capture, and I'll adapt it once this lands.
I read the code at 34b5fb0 and did not run it against the live ARAs.
| return response | ||
|
|
||
| def query_arax_pathfinder(node1_id:str, node1_category:str, node2_id:str, node2_category:str) -> str: | ||
| def query_pathfinder( |
There was a problem hiding this comment.
A small offline test would help here. It could check that each ARA resolves to the right endpoint, that an unknown ARA raises ValueError, and that passing constraints selects the constrained query builder.
| node2_id: str, | ||
| node2_category: str, | ||
| constraints: Optional[Sequence[str]] = None, | ||
| timeout: Optional[float] = None, |
There was a problem hiding this comment.
Good to have this parameter. With the default of None, a call still waits indefinitely when an ARA stops responding. A default of about 300 seconds would match the consortium's five-minute response target for ARAs, and callers could still override it.
| node2_id : str | ||
| node2_category : str | ||
| constraints : sequence of str, optional | ||
| Intermediate node categories. Only up to one allowed. |
There was a problem hiding this comment.
The docstring says only one intermediate category is allowed, and the function passes the list through whatever its length. Either raising on more than one or warning and using the first would make the behaviour match the docstring.
Updates pathfinder to use one function