feat(agent): add learn action flow and grounding guards
This commit is contained in:
@@ -213,6 +213,24 @@ def test_edge_to_action_extract_text():
|
||||
assert a["parameters"]["paragraph"] is True
|
||||
|
||||
|
||||
def test_edge_to_action_extract_table_accepts_tesseract_engine_and_variable_name():
|
||||
edge = _FakeEdge(_FakeAction(
|
||||
"extract_table",
|
||||
parameters={
|
||||
"variable_name": "t_extraction_liste",
|
||||
"pattern": r"^25\d{6}$",
|
||||
"engine": "tesseract",
|
||||
},
|
||||
))
|
||||
actions = _edge_to_normalized_actions(edge, params={})
|
||||
assert len(actions) == 1
|
||||
a = actions[0]
|
||||
assert a["type"] == "extract_table"
|
||||
assert a["parameters"]["output_var"] == "t_extraction_liste"
|
||||
assert a["parameters"]["pattern"] == r"^25\d{6}$"
|
||||
assert a["parameters"]["engine"] == "tesseract"
|
||||
|
||||
|
||||
def test_edge_to_action_t2a_decision():
|
||||
edge = _FakeEdge(_FakeAction(
|
||||
"t2a_decision",
|
||||
|
||||
Reference in New Issue
Block a user