itam-assistant 0.1.16__py3-none-any.whl → 0.1.17__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- itam_assistant/do_ai.py +1 -0
- itam_assistant/intent_detail.py +28 -2
- {itam_assistant-0.1.16.dist-info → itam_assistant-0.1.17.dist-info}/METADATA +2 -2
- {itam_assistant-0.1.16.dist-info → itam_assistant-0.1.17.dist-info}/RECORD +6 -6
- {itam_assistant-0.1.16.dist-info → itam_assistant-0.1.17.dist-info}/WHEEL +0 -0
- {itam_assistant-0.1.16.dist-info → itam_assistant-0.1.17.dist-info}/top_level.txt +0 -0
itam_assistant/do_ai.py
CHANGED
itam_assistant/intent_detail.py
CHANGED
|
@@ -31,7 +31,33 @@ class webapiClient():
|
|
|
31
31
|
self.conn = http.client.HTTPSConnection("apaas-spring-3bf03.aedev.feishuapp.cn")
|
|
32
32
|
headers['x-kunlun-switchctxtoprod'] = True
|
|
33
33
|
|
|
34
|
-
|
|
34
|
+
def intentdetaillist_cookiecheck(self):
|
|
35
|
+
#检查接口的授权信息是否有效
|
|
36
|
+
# 输入参数类型和范围检查
|
|
37
|
+
startAt = int(time.time()) - 30 * 24 * 60 * 60
|
|
38
|
+
endAt = int(time.time())
|
|
39
|
+
payload = json.dumps({
|
|
40
|
+
"startAt": startAt,
|
|
41
|
+
"endAt": endAt,
|
|
42
|
+
"matchIntentID": "",
|
|
43
|
+
"matchStatus": [],
|
|
44
|
+
"pageSize": 50
|
|
45
|
+
})
|
|
46
|
+
try:
|
|
47
|
+
self.conn.request("POST",
|
|
48
|
+
f"/ai/api/v1/conversational_runtime/namespaces/{self.aily_app_id}/stats/intent_detail_list",
|
|
49
|
+
payload, self.headers)
|
|
50
|
+
res = self.conn.getresponse()
|
|
51
|
+
# 检查响应状态码
|
|
52
|
+
if res.status != 200:
|
|
53
|
+
raise http.client.HTTPException(f"请求失败,状态码: {res.status}, 原因: {res.reason}")
|
|
54
|
+
data = res.read()
|
|
55
|
+
data_str = data.decode('utf-8')
|
|
56
|
+
data_dict = json.loads(data_str)
|
|
57
|
+
if data_dict.get('error_msg'):
|
|
58
|
+
raise ValueError(f"接口intent_detail_list,报错{data_str},可能是cookie/x-kunlun-token无效请检查")
|
|
59
|
+
except http.client.HTTPException as http_err:
|
|
60
|
+
print(f"HTTP 请求错误: {http_err}")
|
|
35
61
|
|
|
36
62
|
def get_intent_detail_list(self, startAt, pageSize):
|
|
37
63
|
"""
|
|
@@ -59,7 +85,7 @@ class webapiClient():
|
|
|
59
85
|
"endAt": endAt,
|
|
60
86
|
"matchIntentID": "",
|
|
61
87
|
"matchStatus": [],
|
|
62
|
-
"pageSize": pageSize+
|
|
88
|
+
"pageSize": pageSize+500
|
|
63
89
|
})
|
|
64
90
|
try:
|
|
65
91
|
self.conn.request("POST",f"/ai/api/v1/conversational_runtime/namespaces/{self.aily_app_id}/stats/intent_detail_list",payload, self.headers)
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
itam_assistant/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
itam_assistant/ailyapp_client.py,sha256=w-ihtcmRgOQCgWK0jB8eHGCikjo1tbre3xCiEKhLrUA,6357
|
|
3
3
|
itam_assistant/config.py,sha256=L_5grm2ZWwg_S1JTOU6XLhQ5GPeYJaBFBLwzP2JA5Ys,5498
|
|
4
|
-
itam_assistant/do_ai.py,sha256=
|
|
5
|
-
itam_assistant/intent_detail.py,sha256=
|
|
4
|
+
itam_assistant/do_ai.py,sha256=7amM5GXP1cRuoPptWsUOi6MRswOMn66e90HcUcJ45Pc,49740
|
|
5
|
+
itam_assistant/intent_detail.py,sha256=xeQcUa5fDzEWxEV7pudmWMTKFiR_6-zH7hpDC6D7B3I,18378
|
|
6
6
|
itam_assistant/lark_client.py,sha256=ZVDsdt7ucQvJN1-khC3TR-0IMeYaQXfdWF5DxRrkBH4,6665
|
|
7
7
|
itam_assistant/logger.py,sha256=W3-tbQ4J-QKSrQSpaNBruzoyMuWYrUkrIY0uBZ1o-lw,1583
|
|
8
8
|
itam_assistant/openapi.py,sha256=xLNLB5Tui_nfDsa95VwASHWa5TMq_oRcFgSOGRaTbyU,50383
|
|
9
9
|
itam_assistant/test.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
|
-
itam_assistant-0.1.
|
|
11
|
-
itam_assistant-0.1.
|
|
12
|
-
itam_assistant-0.1.
|
|
13
|
-
itam_assistant-0.1.
|
|
10
|
+
itam_assistant-0.1.17.dist-info/METADATA,sha256=KAarzUvVSsr-OXetG_ltuQft7ERIIr8s6Dg2PBoGHVg,756
|
|
11
|
+
itam_assistant-0.1.17.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
12
|
+
itam_assistant-0.1.17.dist-info/top_level.txt,sha256=KpZA4H04XBVAB3NLq0AAEOrAGEurwMnWw41AhJVqVFI,15
|
|
13
|
+
itam_assistant-0.1.17.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|