mirror of
https://github.com/tiennm99/DocsGPT.git
synced 2026-10-13 00:14:02 +00:00
feat: gated prompt for artefacts
This commit is contained in:
1 parent
3254543292
commit
ec39836ff6
11 files changed
+315
-8
No files matched your search
@@ -1332,3 +1332,19 @@ class TestToolExecutorAdditionalCoverage:
|
||||
tool_config = call_args[1].get("tool_config", call_args[0][1] if len(call_args[0]) > 1 else {})
|
||||
assert tool_config.get("body_content_type") == "application/json"
|
||||
assert tool_config.get("body_encoding_rules") == {"encode_as": "json"}
|
||||
|
||||
|
||||
@pytest.mark.unit
|
||||
class TestGetEnabledToolNames:
|
||||
def test_returns_names_from_get_tools(self, monkeypatch):
|
||||
executor = ToolExecutor()
|
||||
monkeypatch.setattr(
|
||||
executor,
|
||||
"get_tools",
|
||||
lambda: {
|
||||
"id1": {"name": "code_executor"},
|
||||
"id2": {"name": "search"},
|
||||
"id3": {}, # nameless rows are skipped
|
||||
},
|
||||
)
|
||||
assert executor.get_enabled_tool_names() == {"code_executor", "search"}
|
||||
Reference in new issue
Block a user