From 2dfc3dd1d3483ad18a636fca4bfb76e10999ebef Mon Sep 17 00:00:00 2001 From: Nichollette Date: Mon, 23 Sep 2024 17:54:36 -0400 Subject: [PATCH] extracted all available parameters for x-bte in mkg aprser --- src/utils/metakg/endpoint.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/utils/metakg/endpoint.py b/src/utils/metakg/endpoint.py index 92213c6b..9b2eba1b 100644 --- a/src/utils/metakg/endpoint.py +++ b/src/utils/metakg/endpoint.py @@ -82,6 +82,17 @@ def parse_individual_operation(self, op, method, path_params): "response_mapping": response_mapping, "tags": query_operation.tags, } + + # Add additional fields to update_info if they exist in the operation + if "agent_type" in op: + update_info["agent_type"] = op["agent_type"] + if "knowledge_level" in op: + update_info["knowledge_level"] = op["knowledge_level"] + if "testExamples" in op: + update_info["testExamples"] = op["testExamples"] + if "useTemplating" in op: + update_info["useTemplating"] = op["useTemplating"] + res.append(update_info) return res