itam-assistant 0.1.5__tar.gz → 0.1.7__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.5 → itam_assistant-0.1.7}/PKG-INFO +2 -2
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/do_ai.py +19 -19
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant.egg-info/PKG-INFO +2 -2
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/setup.py +2 -2
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/README.md +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/__init__.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/ailyapp_client.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/config.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/intent_detail.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/lark_client.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/logger.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/openapi.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant/test.py +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant.egg-info/SOURCES.txt +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant.egg-info/dependency_links.txt +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant.egg-info/requires.txt +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/itam_assistant.egg-info/top_level.txt +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/setup.cfg +0 -0
- {itam_assistant-0.1.5 → itam_assistant-0.1.7}/test/test.py +0 -0
|
@@ -20,10 +20,7 @@ def do_ai_auto(Testk_data, clientinfo):
|
|
|
20
20
|
"""
|
|
21
21
|
startAt = 0
|
|
22
22
|
try:
|
|
23
|
-
|
|
24
|
-
tenant_access_token = AilyLarkClient(clientinfo).get_tenant_access_token()
|
|
25
|
-
if not tenant_access_token:
|
|
26
|
-
raise ValueError("未能获取到有效的租户访问令牌")
|
|
23
|
+
|
|
27
24
|
# 判断Testsuitelink中是否包含https://
|
|
28
25
|
if "https://" in Testk_data:
|
|
29
26
|
|
|
@@ -48,6 +45,10 @@ def do_ai_auto(Testk_data, clientinfo):
|
|
|
48
45
|
test = json.loads(test)
|
|
49
46
|
userinput = test['data']['value_ranges'][0]['values']
|
|
50
47
|
print(f"表头为{userinput[0]}")
|
|
48
|
+
# 获取租户访问令牌
|
|
49
|
+
tenant_access_token = AilyLarkClient(clientinfo).get_tenant_access_token()
|
|
50
|
+
if not tenant_access_token:
|
|
51
|
+
raise ValueError("未能获取到有效的租户访问令牌")
|
|
51
52
|
for i in range(1, row_count):
|
|
52
53
|
if userinput[i][0]:
|
|
53
54
|
if startAt == 0:
|
|
@@ -76,6 +77,10 @@ def do_ai_auto(Testk_data, clientinfo):
|
|
|
76
77
|
elif Testk_data[0].get('ext'):
|
|
77
78
|
num = 0
|
|
78
79
|
for i in Testk_data:
|
|
80
|
+
# 获取租户访问令牌
|
|
81
|
+
tenant_access_token = AilyLarkClient(clientinfo).get_tenant_access_token()
|
|
82
|
+
if not tenant_access_token:
|
|
83
|
+
raise ValueError("未能获取到有效的租户访问令牌")
|
|
79
84
|
aa = i['ext']['input']
|
|
80
85
|
if startAt == 0:
|
|
81
86
|
startAt = int(time.time())
|
|
@@ -329,12 +334,12 @@ def do_metricsevaluation_list(collections,data,score_threshold):
|
|
|
329
334
|
"""
|
|
330
335
|
info = {
|
|
331
336
|
"input": {
|
|
332
|
-
"用户输入/userInput": "
|
|
337
|
+
"用户输入/userInput": "测试数据"
|
|
333
338
|
},
|
|
334
339
|
"output": {
|
|
335
|
-
"用户输入/output": "
|
|
340
|
+
"用户输入/output": "测试数据"
|
|
336
341
|
},
|
|
337
|
-
"rt":
|
|
342
|
+
"rt": False,
|
|
338
343
|
"label": [{"label": "测试"}, {"label": "测试"}],
|
|
339
344
|
"exp": [{"label": "测试"}, {"label": "测试" }],
|
|
340
345
|
"artificial": []
|
|
@@ -343,21 +348,15 @@ def do_metricsevaluation_list(collections,data,score_threshold):
|
|
|
343
348
|
businessscenario = []
|
|
344
349
|
for i in collections:
|
|
345
350
|
for j in data:
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
"rt": False,
|
|
351
|
-
"label": [{"label": "测试"}, {"label": "测试"}],
|
|
352
|
-
"exp": [{"label": "测试",}, {"label": "测试"}],
|
|
353
|
-
"artificial": []
|
|
354
|
-
}
|
|
355
|
-
info['input']['用户输入/userInput'] = i['ext']['output']
|
|
351
|
+
cleaned_content = i['content'].replace('\r', '').replace('\n', '').replace('\\', '')
|
|
352
|
+
cleaned_userInput = j['用户输入/userInput'].replace('\r', '').replace('\n', '').replace('\\', '')
|
|
353
|
+
if cleaned_content == cleaned_userInput:
|
|
354
|
+
info['input']['用户输入/userInput'] = i['ext']['input']
|
|
356
355
|
info['output']['用户输入/output'] = "对话id:"+j['对话日志/intentID']+" 对话内容:"+j['用户输入/userInput']
|
|
357
356
|
if i['ext']['BPO标注-AP-分发技能'] != '' and i['ext']['BPO标注-AP-分发技能'] in j['分发技能/skill'][0]:
|
|
358
357
|
info['rt'] = True
|
|
359
358
|
info['label'] = [{'label': j['分发技能/skill'][0]}]
|
|
360
|
-
info['exp'] = [{'label':
|
|
359
|
+
info['exp'] = [{'label': i['ext']['BPO标注-AP-分发技能']}]
|
|
361
360
|
info['artificial'] = info['exp']
|
|
362
361
|
else:
|
|
363
362
|
info['rt'] = False
|
|
@@ -368,8 +367,9 @@ def do_metricsevaluation_list(collections,data,score_threshold):
|
|
|
368
367
|
businessscenario.append(i['ext']['BPO标注-AP-分发技能'])
|
|
369
368
|
#将data中的j删除
|
|
370
369
|
data.remove(j)
|
|
370
|
+
info_list.append(copy.deepcopy(info))
|
|
371
|
+
print(info)
|
|
371
372
|
break
|
|
372
|
-
info_list.append(copy.deepcopy(info))
|
|
373
373
|
return info_list,businessscenario
|
|
374
374
|
|
|
375
375
|
|
|
@@ -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.7", # 版本号
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|