itam-assistant 0.1.16__tar.gz → 0.1.18__tar.gz
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-0.1.16 → itam_assistant-0.1.18}/PKG-INFO +2 -2
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/do_ai.py +2 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/intent_detail.py +28 -2
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant.egg-info/PKG-INFO +2 -2
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/setup.py +2 -2
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/README.md +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/__init__.py +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/ailyapp_client.py +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/config.py +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/lark_client.py +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/logger.py +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/openapi.py +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant/test.py +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant.egg-info/SOURCES.txt +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant.egg-info/dependency_links.txt +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant.egg-info/requires.txt +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant.egg-info/top_level.txt +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/setup.cfg +0 -0
- {itam_assistant-0.1.16 → itam_assistant-0.1.18}/test/test.py +0 -0
|
@@ -19,6 +19,7 @@ def do_ai_auto(Testk_data, clientinfo):
|
|
|
19
19
|
自动化执行AI测试用例
|
|
20
20
|
"""
|
|
21
21
|
startAt = 0
|
|
22
|
+
webapiClient(clientinfo).intentdetaillist_cookiecheck()
|
|
22
23
|
try:
|
|
23
24
|
|
|
24
25
|
# 判断Testsuitelink中是否包含https://
|
|
@@ -103,6 +104,7 @@ def do_ai_auto(Testk_data, clientinfo):
|
|
|
103
104
|
time.sleep(4)
|
|
104
105
|
num = num + 1
|
|
105
106
|
time.sleep(4)
|
|
107
|
+
print(f"已处理{num}/{len(Testk_data)}条数据,用户输入为:{aa}")
|
|
106
108
|
return startAt, num
|
|
107
109
|
except KeyError as ke:
|
|
108
110
|
print(f"KeyError 发生: 数据中缺少必要的键,错误详情: {ke}")
|
|
@@ -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)
|
|
@@ -2,10 +2,10 @@ from setuptools import setup, find_packages
|
|
|
2
2
|
|
|
3
3
|
setup(
|
|
4
4
|
name="itam_assistant", # 包名称
|
|
5
|
-
version="0.1.
|
|
5
|
+
version="0.1.18", # 版本号
|
|
6
6
|
author="liujunmeiD",
|
|
7
7
|
author_email="1105030421@qq.com",
|
|
8
|
-
description="
|
|
8
|
+
description="新增功能:打印出记录",
|
|
9
9
|
long_description=open("README.md").read(),
|
|
10
10
|
long_description_content_type="text/markdown",
|
|
11
11
|
url="https://github.com/liujunmeiD/itam_assistant",
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{itam_assistant-0.1.16 → itam_assistant-0.1.18}/itam_assistant.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|