Commit 2d2ee657 authored by Yaowentong's avatar Yaowentong

ai对话机器人修复

parent 51904b4e
......@@ -245,21 +245,18 @@ def doubao_mobile_process_original_data(data):
response_content += text_block
if content_block[0].get('block_type') == 10025:
if content_block[0].get('content').get('search_query_result_block').get(
'results') is not None:
search_keyword.extend(
content_block[0].get('content').get('search_query_result_block').get(
'queries'))
# think_content += "\n\n**"
# think_content += content_block[0].get('content').get(
# 'search_query_result_block').get('summary', '')
# think_content += "**\n\n"
for i in content_block[0].get('content').get('search_query_result_block').get(
'results'):
if i.get('text_card'):
url_list.append(i.get('text_card'))
if i.get('video_card'):
rich_media_block.append(i.get('video_card'))
if content_block[0].get('content'):
if content_block[0].get('content').get('search_query_result_block').get(
'results') is not None:
search_keyword.extend(
content_block[0].get('content').get('search_query_result_block').get(
'queries'))
for i in content_block[0].get('content').get('search_query_result_block').get(
'results'):
if i.get('text_card'):
url_list.append(i.get('text_card'))
if i.get('video_card'):
rich_media_block.append(i.get('video_card'))
if content_block[0].get('block_type') == 10050:
creations = content_block[0].get('content',{}).get('rich_media_block',{}).get('creations')
if creations:
......@@ -298,11 +295,11 @@ def doubao_mobile_process_original_data(data):
new_url_list.append(item)
url_list = new_url_list
spider_save_tos.process_and_save_files(file_path, search_keyword, url_list, think_content, response_content,
suggestions, rich_media_block)
return (file_path, search_keyword, url_list, think_content, response_content, suggestions)
except Exception as e:
# traceback.print_exc()
parts = file_path.split('/')
platform = parts[2]
task_id = parts[1]
......@@ -334,7 +331,7 @@ if __name__ == '__main__':
# file_path = 'geo/c7eb465e-f385-4aa2-89c4-a7cf11897f45/KIMI/1(1).txt'
data_list = bh_utils.query_data(
f"select * from geo_commit_task where taskId = '48d5b7e0-49e8-491b-8719-bcb82daee835' and platform = 'DOUBA'")
f"select * from geo_commit_task where taskId = '8f605073-841a-4e8f-ac4b-1a686d5e9c4f' and platform = 'DOUBA'")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment