Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix test_retrieve_tool_func_result_error failure in python version >=…
… 3.11 (#3017) Currently this test will fail in python version >= 3.11, the reason is because: ![image](https://github.com/microsoft/promptflow/assets/49388944/35195bc0-1a46-4969-bb28-e1ee1e196829) So the error message in python version >= 3.11 will be: 'Unable to retrieve tool func result due to \'ToolFuncCallScenario **ToolFuncCallScenario.REVERSE_GENERATED_BY** response must be a dict. {"index_type": "Azure Cognitive Search", "index": "index_1"} is not a dict.\'. \nPlease contact the tool author/support team for troubleshooting assistance.' But in the python version < 3.11, the error message will be: 'Unable to retrieve tool func result due to \'ToolFuncCallScenario **reverse_generated_by** response must be a dict. {"index_type": "Azure Cognitive Search", "index": "index_1"} is not a dict.\'. \nPlease contact the tool author/support team for troubleshooting assistance.' In order to keep the test stable in different python environment, so change the error message from: f"ToolFuncCallScenario {func_call_scenario} response must be a dict. " f"{result} is not a dict." to f"ToolFuncCallScenario {func_call_scenario.**value**} response must be a dict. " f"{result} is not a dict." --------- Co-authored-by: Ge Gao <[email protected]>
- Loading branch information