Skip to content

Commit db6d038

Browse files
committed
delete tool/path/needcheck attributes
1 parent a86ecc7 commit db6d038

File tree

3 files changed

+9
-52
lines changed

3 files changed

+9
-52
lines changed

muagent/schemas/ekg/ekg_graph.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def attrbutes(self, ):
7676

7777

7878
class EKGIntentNodeSchema(EKGNodeSchema):
79-
path: str = ''
79+
# path: str = ''
8080

8181
def attrbutes(self, ):
8282
extra_attr = json.loads(self.extra)
@@ -107,8 +107,8 @@ def attrbutes(self, ):
107107
}
108108

109109
class EKGTaskNodeSchema(EKGNodeSchema):
110-
tool: str
111-
needcheck: bool
110+
# tool: str
111+
# needcheck: bool
112112
# when to access
113113
accesscriteria: str
114114
#
@@ -123,7 +123,7 @@ def attrbutes(self, ):
123123
"teamids": self.teamids,
124124
"accesscriteria": self.accesscriteria,
125125
"needcheck": self.needcheck,
126-
"tool": self.tool
126+
# "tool": self.tool
127127
},
128128
**extra_attr
129129
}

muagent/service/ekg_construct/ekg_construct_base.py

Lines changed: 1 addition & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,47 +1041,4 @@ def _update_new_attr_for_edges(self, edges: List[GEdge], teamid: str, teamids_by
10411041
edge.attributes.pop("@timestamp")
10421042
edge.attributes.pop("extra")
10431043
return edges
1044-
1045-
def get_intent_by_alarm(self, alarm: dict, ) -> EKGIntentResp:
1046-
'''according content search intent'''
1047-
import requests
1048-
error_type = alarm.get('errorType', '')
1049-
title = alarm.get('title', '')
1050-
content = alarm.get('content', '')
1051-
biz_code = alarm.get('bizCode', '')
1052-
1053-
if not error_type or not title or not content or not biz_code:
1054-
return None, None
1055-
1056-
alarm = {
1057-
'type': 'ANTEMC_DINGTALK',
1058-
'user_input': {
1059-
'bizCode': biz_code,
1060-
'title': title,
1061-
'content': content,
1062-
'execute_type': 'gql',
1063-
'errorType': error_type
1064-
}
1065-
}
1066-
1067-
body = {
1068-
'features': {
1069-
'query': alarm
1070-
}
1071-
}
1072-
intent_url = 'https://paiplusinferencepre.alipay.com/inference/ff998e48456308a9_EKG_route/0.1'
1073-
headers = {
1074-
'Content-Type': 'application/json;charset=utf-8',
1075-
'MPS-app-name': 'test',
1076-
'MPS-http-version': '1.0'
1077-
}
1078-
ans = requests.post(intent_url, json=body, headers=headers)
1079-
1080-
ans_json = ans.json()
1081-
output = ans_json.get('resultMap').get('output')
1082-
logger.debug(f"{body}")
1083-
logger.debug(f"{output}")
1084-
output_json = json.loads(output)
1085-
res = output_json[-1]
1086-
all_intent = output_json
1087-
return res, all_intent
1044+

tests/service/ekg_construct_test_2.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,12 @@ def generate_node(id, type):
103103
extra_attr["enable"] = False
104104

105105
if type == "opsgptkg_task":
106-
extra_attr["accessCriteria"] = "hello"
106+
extra_attr["accesscriteria"] = "hello"
107107

108108
if type == "opsgptkg_analysis":
109-
extra_attr["accessCriteria"] = "hello"
110-
extra_attr["summarySwtich"] = False
111-
extra_attr['dslTemplate'] = "hello"
109+
extra_attr["accesscriteria"] = "hello"
110+
extra_attr["summaryswtich"] = False
111+
extra_attr['dsltemplate'] = "hello"
112112

113113
return GNode(**{
114114
"id": id,

0 commit comments

Comments
 (0)