Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in / Register
Toggle navigation
A
aidso-data
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Yaowentong
aidso-data
Commits
cf03ab12
Commit
cf03ab12
authored
Jun 23, 2026
by
Yaowentong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
元宝千问修复
parent
d521b79d
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
410 additions
and
268 deletions
+410
-268
down_load_bot.py
aidso_geo/core/down_load_bot.py
+1
-1
hua.py
aidso_geo/core/hua.py
+0
-1
process.py
aidso_geo/models/process.py
+33
-38
qianwen_android_data_process.py
aidso_geo/models/qianwen_android_data_process.py
+252
-189
qianwen_data_process.py
aidso_geo/models/qianwen_data_process.py
+14
-3
spider_save_tos.py
aidso_geo/models/spider_save_tos.py
+40
-0
yuanbao_android_data_process.py
aidso_geo/models/yuanbao_android_data_process.py
+60
-4
ai_utils.py
aidso_geo/utils/ai_utils.py
+10
-32
No files found.
aidso_geo/core/down_load_bot.py
View file @
cf03ab12
...
@@ -1047,7 +1047,7 @@ if __name__ == "__main__":
...
@@ -1047,7 +1047,7 @@ if __name__ == "__main__":
# for b in brand_name:
# for b in brand_name:
# zhou_report(phone, begin, end, b)
# zhou_report(phone, begin, end, b)
# # qian_report(phone,begin,end,b)
# # qian_report(phone,begin,end,b)
#
qian_report(phone,begin,end,b)
#
qian_report(phone,begin,end,b)
brand_library_id
=
2063180776253702144
brand_library_id
=
2063180776253702144
user_id
=
2063177785609949184
user_id
=
2063177785609949184
begin
=
'2026-06-08'
begin
=
'2026-06-08'
...
...
aidso_geo/core/hua.py
View file @
cf03ab12
from
venv
import
logger
import
tldextract
as
tldextract
import
tldextract
as
tldextract
from
openpyxl
import
load_workbook
from
openpyxl
import
load_workbook
...
...
aidso_geo/models/process.py
View file @
cf03ab12
...
@@ -1910,43 +1910,38 @@ def run_data(PAGE_SIZE,MAX_WORKERS):
...
@@ -1910,43 +1910,38 @@ def run_data(PAGE_SIZE,MAX_WORKERS):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
# data_list = bh_utils.query_data(f"select * from geo_commit_task where reqId = '84db7b12-88e7-4aaa-bc58-8d61f1051934'")
data_list
=
bh_utils
.
query_data
(
f
"select * from geo_commit_task where status ='ING' "
)
# # data_list = bh_utils.query_data(query_sql)
# data_list = bh_utils.query_data(query_sql)
# # print(data_list)
# print(data_list)
# # # #
# # #
# # # #
# # #
# # # # # #
# # # # #
# def handle_item(i):
def
handle_item
(
i
):
# if i.get('comWordsMap'):
if
i
.
get
(
'comWordsMap'
):
# i['comWordsMap'] = json.loads(i.get('comWordsMap'))
i
[
'comWordsMap'
]
=
json
.
loads
(
i
.
get
(
'comWordsMap'
))
# if i.get('brandWords'):
if
i
.
get
(
'brandWords'
):
# i['brandWords'] = json.loads(i.get('brandWords'))
i
[
'brandWords'
]
=
json
.
loads
(
i
.
get
(
'brandWords'
))
# if i.get('comWords'):
if
i
.
get
(
'comWords'
):
# i['comWords'] = json.loads(i.get('comWords'))
i
[
'comWords'
]
=
json
.
loads
(
i
.
get
(
'comWords'
))
# if i.get('keywords'):
if
i
.
get
(
'keywords'
):
# i['keywords'] = json.loads(i.get('keywords'))
i
[
'keywords'
]
=
json
.
loads
(
i
.
get
(
'keywords'
))
# if i.get('productWordsMap'):
if
i
.
get
(
'productWordsMap'
):
# i['productWordsMap'] = json.loads(i.get('productWordsMap'))
i
[
'productWordsMap'
]
=
json
.
loads
(
i
.
get
(
'productWordsMap'
))
# type_t = i.get('type')
type_t
=
i
.
get
(
'type'
)
# # type_t = 'batch'
# type_t = 'batch'
#
# # return task_send_queue(i,type_t)
# return task_send_queue(i,type_t)
# return platform_process(i)
return
platform_process
(
i
)
#
# if data_list:
if
data_list
:
# with ThreadPoolExecutor(max_workers=30) as executor:
with
ThreadPoolExecutor
(
max_workers
=
30
)
as
executor
:
# futures = [executor.submit(handle_item, i) for i in data_list]
futures
=
[
executor
.
submit
(
handle_item
,
i
)
for
i
in
data_list
]
#
# for future in as_completed(futures):
for
future
in
as_completed
(
futures
):
# try:
try
:
# future.result()
future
.
result
()
# except Exception as e:
except
Exception
as
e
:
# logger.exception(f"platform_process 执行异常: {e}")
logger
.
exception
(
f
"platform_process 执行异常: {e}"
)
PAGE_SIZE
=
1000
MAX_WORKERS
=
50
run_data
(
PAGE_SIZE
,
MAX_WORKERS
)
text
=
"""
"""
# keywords = []
# keywords = []
# get_keyword_ranks()
# get_keyword_ranks()
aidso_geo/models/qianwen_android_data_process.py
View file @
cf03ab12
This diff is collapsed.
Click to expand it.
aidso_geo/models/qianwen_data_process.py
View file @
cf03ab12
...
@@ -15,6 +15,7 @@ def qianwen_process_original_data(data):
...
@@ -15,6 +15,7 @@ def qianwen_process_original_data(data):
response_content
=
""
response_content
=
""
search_keyword
=
[]
search_keyword
=
[]
suggestions
=
[]
suggestions
=
[]
rich_media_block
=
[]
is_think
=
False
is_think
=
False
think_bool
=
False
think_bool
=
False
response_bool
=
False
response_bool
=
False
...
@@ -32,6 +33,7 @@ def qianwen_process_original_data(data):
...
@@ -32,6 +33,7 @@ def qianwen_process_original_data(data):
data_str
=
i
.
split
(
"data:"
)[
1
]
data_str
=
i
.
split
(
"data:"
)[
1
]
json_data
=
json
.
loads
(
data_str
)
json_data
=
json
.
loads
(
data_str
)
except
(
IndexError
,
json
.
JSONDecodeError
):
except
(
IndexError
,
json
.
JSONDecodeError
):
continue
continue
...
@@ -85,7 +87,9 @@ def qianwen_process_original_data(data):
...
@@ -85,7 +87,9 @@ def qianwen_process_original_data(data):
if
json_data
.
get
(
"data"
)
.
get
(
'messages'
):
if
json_data
.
get
(
"data"
)
.
get
(
'messages'
):
messages
=
json_data
.
get
(
"data"
)
.
get
(
'messages'
)
messages
=
json_data
.
get
(
"data"
)
.
get
(
'messages'
)
for
ms
in
messages
:
for
ms
in
messages
:
if
ms
.
get
(
'mime_type'
)
==
'multi_load/iframe'
and
ms
.
get
(
'status'
)
==
'complete'
:
if
ms
.
get
(
'mime_type'
)
==
'multi_load/iframe'
and
ms
.
get
(
'status'
)
==
'complete'
:
response_content
=
ms
.
get
(
'content'
)
response_content
=
ms
.
get
(
'content'
)
response_content
=
response_content
.
replace
(
"[(deep_think)]"
,
""
)
response_content
=
response_content
.
replace
(
"[(deep_think)]"
,
""
)
...
@@ -97,13 +101,20 @@ def qianwen_process_original_data(data):
...
@@ -97,13 +101,20 @@ def qianwen_process_original_data(data):
if
mu
.
get
(
'content'
)
.
get
(
'status'
)
==
'complete'
:
if
mu
.
get
(
'content'
)
.
get
(
'status'
)
==
'complete'
:
think_content
=
mu
.
get
(
'content'
)
.
get
(
'think_content'
)
think_content
=
mu
.
get
(
'content'
)
.
get
(
'think_content'
)
if
mu
.
get
(
'type'
)
==
'ref_source_inline'
:
if
mu
.
get
(
'type'
)
==
'ref_source_inline'
:
mu_content
=
mu
.
get
(
'content'
)
mu_content
=
mu
.
get
(
'content'
)
if
mu_content
:
if
mu_content
:
if
mu_content
.
get
(
'query_list'
):
if
mu_content
.
get
(
'query_list'
):
search_keyword
.
extend
(
mu_content
.
get
(
'query_list'
))
search_keyword
.
extend
(
mu_content
.
get
(
'query_list'
))
if
mu_content
.
get
(
'list'
):
if
mu_content
.
get
(
'list'
):
url_list_batch
.
extend
(
mu_content
.
get
(
'list'
))
url_list_batch
.
extend
(
mu_content
.
get
(
'list'
))
if
mu
.
get
(
'type'
)
==
'video_note_list'
:
rich_media_block
.
append
(
{
"url"
:
mu
.
get
(
'content'
)
.
get
(
'list'
),
"source_seq"
:
mu
.
get
(
'source_seq'
)
}
)
if
ms
.
get
(
'mime_type'
)
==
'bar/iframe'
and
ms
.
get
(
'status'
)
==
'complete'
:
if
ms
.
get
(
'mime_type'
)
==
'bar/iframe'
and
ms
.
get
(
'status'
)
==
'complete'
:
if
ms
.
get
(
'meta_data'
)
.
get
(
'sources'
):
if
ms
.
get
(
'meta_data'
)
.
get
(
'sources'
):
...
@@ -128,7 +139,7 @@ def qianwen_process_original_data(data):
...
@@ -128,7 +139,7 @@ def qianwen_process_original_data(data):
)
)
spider_save_tos
.
process_and_save_files
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
spider_save_tos
.
process_and_save_files
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
suggestions
,
rich_media_block
)
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
except
Exception
as
e
:
except
Exception
as
e
:
parts
=
file_path
.
split
(
'/'
)
parts
=
file_path
.
split
(
'/'
)
...
@@ -162,7 +173,7 @@ if __name__ == '__main__':
...
@@ -162,7 +173,7 @@ if __name__ == '__main__':
# # file_path3 = 'geo/51a7ee04-711c-4cf0-9d4c-4b523fba7037/TYQW/original.text'
# # file_path3 = 'geo/51a7ee04-711c-4cf0-9d4c-4b523fba7037/TYQW/original.text'
# qianwen_process_original_data(file_path2)
# qianwen_process_original_data(file_path2)
# for i in task_id:
# for i in task_id:
data_list
=
bh_utils
.
query_data
(
f
"select * from geo_commit_task where taskId = '
16e53643-b1ac-4566-a0aa-68340576a3ff
' and platform = 'TYQW'"
)
data_list
=
bh_utils
.
query_data
(
f
"select * from geo_commit_task where taskId = '
3e317dd8-2512-476c-a31a-104c0bcaca75
' and platform = 'TYQW'"
)
# # #
# # #
# # #
# # #
...
...
aidso_geo/models/spider_save_tos.py
View file @
cf03ab12
...
@@ -73,6 +73,22 @@ def doubao_android_process_rich_media(url_list):
...
@@ -73,6 +73,22 @@ def doubao_android_process_rich_media(url_list):
quto_list
.
append
(
raw_data
)
quto_list
.
append
(
raw_data
)
return
quto_list
return
quto_list
def
yuanbao_android_process_rich_media
(
url_list
):
quto_list
=
[]
for
item
in
url_list
:
video_id
=
item
.
get
(
'mediaId'
,
''
)
raw_data
=
{
"video_id"
:
video_id
,
"video_captions"
:
item
.
get
(
'title'
,
''
),
"video_first_frame_image"
:
item
.
get
(
'url'
,
''
)
or
item
.
get
(
'resourceUrl'
)
or
''
,
"main_site_url"
:
''
,
"source_app_name"
:
'视频号'
}
quto_list
.
append
(
raw_data
)
return
quto_list
def
doubao_process_rich_media
(
url_list
):
def
doubao_process_rich_media
(
url_list
):
quto_list
=
[]
quto_list
=
[]
...
@@ -121,6 +137,26 @@ def qianwen_android_process_rich_media(url_list):
...
@@ -121,6 +137,26 @@ def qianwen_android_process_rich_media(url_list):
quto_list
.
append
(
raw_data
)
quto_list
.
append
(
raw_data
)
return
quto_list
return
quto_list
def
qianwen_process_rich_media
(
url_list
):
quto_list
=
[]
for
item
in
url_list
:
source_seq
=
item
.
get
(
'source_seq'
,
''
)
if
isinstance
(
item
.
get
(
'url'
),
list
):
for
url
in
item
.
get
(
'url'
):
raw_data
=
{
"video_id"
:
url
.
get
(
'zhidaye_id'
,
''
),
"video_captions"
:
url
.
get
(
'title'
,
''
),
"video_first_frame_image"
:
url
.
get
(
'cover'
,
''
),
"main_site_url"
:
url
.
get
(
'norm_url'
,
''
)
or
url
.
get
(
'url'
,
''
),
"author"
:
url
.
get
(
'author'
,
''
),
"publishTime"
:
url
.
get
(
'publishTime'
,
''
),
"duration"
:
url
.
get
(
'duration'
,
''
),
"source_seq"
:
source_seq
}
quto_list
.
append
(
raw_data
)
return
quto_list
def
baidu_ai_rich_media
(
url_list
):
def
baidu_ai_rich_media
(
url_list
):
quto_list
=
[]
quto_list
=
[]
for
item
in
url_list
:
for
item
in
url_list
:
...
@@ -343,6 +379,10 @@ def save_data_to_tos(target_dir, content, file_name):
...
@@ -343,6 +379,10 @@ def save_data_to_tos(target_dir, content, file_name):
content
=
qianwen_android_process_rich_media
(
content
)
content
=
qianwen_android_process_rich_media
(
content
)
if
platform
==
'BDAI'
:
if
platform
==
'BDAI'
:
content
=
baidu_ai_rich_media
(
content
)
content
=
baidu_ai_rich_media
(
content
)
if
platform
==
'TYQW'
:
content
=
qianwen_process_rich_media
(
content
)
if
platform
==
'TXYBA'
:
content
=
yuanbao_android_process_rich_media
(
content
)
if
file_name
==
"quote.txt"
:
if
file_name
==
"quote.txt"
:
if
platform
==
'DB'
:
if
platform
==
'DB'
:
...
...
aidso_geo/models/yuanbao_android_data_process.py
View file @
cf03ab12
import
json
import
json
from
aidso_geo.models
import
spider_save_tos
from
aidso_geo.models
import
spider_save_tos
from
aidso_geo.utils
import
robot_utils
from
aidso_geo.utils
import
robot_utils
,
bh_utils
from
aidso_geo.utils.ai_interface
import
get_parse_sse_result
from
aidso_geo.utils.ai_interface
import
get_parse_sse_result
from
aidso_geo.utils.tos_utils
import
get_string_from_tos
from
aidso_geo.utils.tos_utils
import
get_string_from_tos
...
@@ -17,6 +17,8 @@ def yuanbao_android_process_original_data(data):
...
@@ -17,6 +17,8 @@ def yuanbao_android_process_original_data(data):
is_think
=
False
is_think
=
False
think_bool
=
False
think_bool
=
False
suggestions
=
[]
suggestions
=
[]
rich_media_block
=
[]
mini_program
=
[]
response_bool
=
False
response_bool
=
False
try
:
try
:
original_content
=
get_string_from_tos
(
file_path
)
original_content
=
get_string_from_tos
(
file_path
)
...
@@ -29,6 +31,7 @@ def yuanbao_android_process_original_data(data):
...
@@ -29,6 +31,7 @@ def yuanbao_android_process_original_data(data):
# 提取并解析JSON数据
# 提取并解析JSON数据
data_str
=
i
.
split
(
"data: "
)[
1
]
data_str
=
i
.
split
(
"data: "
)[
1
]
json_data
=
json
.
loads
(
data_str
)
json_data
=
json
.
loads
(
data_str
)
except
(
IndexError
,
json
.
JSONDecodeError
):
except
(
IndexError
,
json
.
JSONDecodeError
):
continue
# 跳过格式错误的数据
continue
# 跳过格式错误的数据
if
json_data
.
get
(
'type'
)
==
'searchGuid'
:
if
json_data
.
get
(
'type'
)
==
'searchGuid'
:
...
@@ -48,10 +51,35 @@ def yuanbao_android_process_original_data(data):
...
@@ -48,10 +51,35 @@ def yuanbao_android_process_original_data(data):
url_list
.
extend
(
json_data
.
get
(
'contents'
)[
0
]
.
get
(
'docs'
))
url_list
.
extend
(
json_data
.
get
(
'contents'
)[
0
]
.
get
(
'docs'
))
if
json_data
.
get
(
'type'
)
==
'image'
:
if
json_data
.
get
(
'type'
)
==
'image'
:
response_content
=
"生成了图片"
response_content
=
"生成了图片"
if
json_data
.
get
(
'type'
)
==
'replace'
:
if
json_data
.
get
(
'replace'
)
.
get
(
'display'
)
==
'videoBoxV2'
:
rich_media_block
.
extend
(
json_data
.
get
(
'replace'
)
.
get
(
'multimedias'
))
if
json_data
.
get
(
'replace'
)
.
get
(
'display'
)
==
'miniProgramBox'
:
response_content
+=
json_data
.
get
(
'replace'
)
.
get
(
'title'
)
response_content
+=
'
\n\n
render_ecom_card_widget_miniprogram_start:
\n\n
'
print
(
json_data
.
get
(
'replace'
)
.
get
(
'multimedias'
))
for
pro
in
json_data
.
get
(
'replace'
)
.
get
(
'multimedias'
):
title
=
pro
.
get
(
'title'
,
''
)
icon
=
pro
.
get
(
'linkInfo'
,
{})
.
get
(
'icon'
,
''
)
or
pro
.
get
(
'linkInfo'
,
{})
.
get
(
'iconDark'
,
''
)
wx_app_id
=
pro
.
get
(
'linkInfo'
,
{})
.
get
(
'wxAppId'
,
''
)
response_mini
=
{
"title"
:
title
,
"icon"
:
icon
,
"wx_app_id"
:
wx_app_id
,
}
mini_program
.
append
(
response_mini
)
mini_program_str
=
json
.
dumps
(
mini_program
,
ensure_ascii
=
False
)
response_content
+=
mini_program_str
response_content
+=
'
\n\n
render_ecom_card_widget_miniprogram_end:'
print
(
response_content
)
spider_save_tos
.
process_and_save_files
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
spider_save_tos
.
process_and_save_files
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
suggestions
,
rich_media_block
)
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
except
Exception
as
e
:
except
Exception
as
e
:
parts
=
file_path
.
split
(
'/'
)
parts
=
file_path
.
split
(
'/'
)
platform
=
parts
[
2
]
platform
=
parts
[
2
]
task_id
=
parts
[
1
]
task_id
=
parts
[
1
]
...
@@ -76,5 +104,33 @@ def yuanbao_android_process_original_data(data):
...
@@ -76,5 +104,33 @@ def yuanbao_android_process_original_data(data):
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
return
(
file_path
,
search_keyword
,
url_list
,
think_content
,
response_content
,
suggestions
)
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
file_path2
=
'geo/5582d220-f032-4095-ad39-1dbc33a536c3/TXYBA/original.text'
# file_path2 = 'geo/6f49084e-f191-447d-849b-bc6c60fd5d20/TXYBA/original.text'
yuanbao_android_process_original_data
(
file_path2
)
# yuanbao_android_process_original_data(file_path2)
data_list
=
bh_utils
.
query_data
(
f
"select * from geo_commit_task where taskId = '6de35e20-4a67-4761-8a16-b91dd1f2fb7f' and platform = 'TXYBA'"
)
# # #
# # #
# # # # #
def
handle_item
(
i
):
if
i
.
get
(
'comWordsMap'
):
i
[
'comWordsMap'
]
=
json
.
loads
(
i
.
get
(
'comWordsMap'
))
if
i
.
get
(
'brandWords'
):
i
[
'brandWords'
]
=
json
.
loads
(
i
.
get
(
'brandWords'
))
if
i
.
get
(
'comWords'
):
i
[
'comWords'
]
=
json
.
loads
(
i
.
get
(
'comWords'
))
if
i
.
get
(
'keywords'
):
i
[
'keywords'
]
=
json
.
loads
(
i
.
get
(
'keywords'
))
if
i
.
get
(
'productWordsMap'
):
i
[
'productWordsMap'
]
=
json
.
loads
(
i
.
get
(
'productWordsMap'
))
return
yuanbao_android_process_original_data
(
i
)
if
data_list
:
for
i
in
data_list
:
try
:
handle_item
(
i
)
except
Exception
as
e
:
...
aidso_geo/utils/ai_utils.py
View file @
cf03ab12
...
@@ -60,7 +60,7 @@ def ai_get_brand_list(content, prompt):
...
@@ -60,7 +60,7 @@ def ai_get_brand_list(content, prompt):
"temperature"
:
0
"temperature"
:
0
})
})
headers
=
{
headers
=
{
'Authorization'
:
'Bearer
fcc424e5-58af-494d-9683-5787413a26c9
'
,
'Authorization'
:
'Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
'
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
}
}
...
@@ -122,36 +122,13 @@ def ai_get_product_list(content, prompt):
...
@@ -122,36 +122,13 @@ def ai_get_product_list(content, prompt):
"content"
:
f
"""请从下面的文本中抽取所有产品词。 文本如下{content}"""
"content"
:
f
"""请从下面的文本中抽取所有产品词。 文本如下{content}"""
}
}
],
],
# "response_format": {
# "type": "json_schema",
# "json_schema": {
# "name": "brand_list",
# "strict": True,
# "schema": {
# "type": "object",
# "properties": {
# "brands": {
# "type": "array",
# "items": {
# "type": "string"
# },
# "description": "原文中的产品词"
# }
# },
# "required": [
# "brands"
# ],
# "additionalProperties": False
# }
# }
# },
"thinking"
:
{
"thinking"
:
{
"type"
:
"disabled"
"type"
:
"disabled"
},
},
"temperature"
:
0
"temperature"
:
0
})
})
headers
=
{
headers
=
{
'Authorization'
:
'Bearer
fcc424e5-58af-494d-9683-5787413a26c9
'
,
'Authorization'
:
'Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
'
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
}
}
...
@@ -218,7 +195,7 @@ def ai_get_product_list_search(product_list):
...
@@ -218,7 +195,7 @@ def ai_get_product_list_search(product_list):
"temperature"
:
0
"temperature"
:
0
})
})
headers
=
{
headers
=
{
'Authorization'
:
'Bearer
fcc424e5-58af-494d-9683-5787413a26c9
'
,
'Authorization'
:
'Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
'
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
}
}
...
@@ -325,7 +302,7 @@ def ai_get_brand_name(content):
...
@@ -325,7 +302,7 @@ def ai_get_brand_name(content):
"temperature"
:
0
"temperature"
:
0
})
})
headers
=
{
headers
=
{
'Authorization'
:
'Bearer
fcc424e5-58af-494d-9683-5787413a26c9
'
,
'Authorization'
:
'Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
'
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
}
}
...
@@ -441,7 +418,7 @@ def ai_get_product_sentiment_and_mentions(brand_list, ai_answer_text):
...
@@ -441,7 +418,7 @@ def ai_get_product_sentiment_and_mentions(brand_list, ai_answer_text):
}
}
headers
=
{
headers
=
{
"Authorization"
:
"Bearer
fcc424e5-58af-494d-9683-5787413a26c9
"
,
"Authorization"
:
"Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
"
,
"Content-Type"
:
"application/json"
"Content-Type"
:
"application/json"
}
}
...
@@ -573,7 +550,7 @@ def ai_get_brand_sentiment_and_mentions(brand_list, ai_answer_text):
...
@@ -573,7 +550,7 @@ def ai_get_brand_sentiment_and_mentions(brand_list, ai_answer_text):
}
}
headers
=
{
headers
=
{
"Authorization"
:
"Bearer
fcc424e5-58af-494d-9683-5787413a26c9
"
,
"Authorization"
:
"Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
"
,
"Content-Type"
:
"application/json"
"Content-Type"
:
"application/json"
}
}
...
@@ -717,7 +694,7 @@ def ai_get_product_and_brands(content, prompt):
...
@@ -717,7 +694,7 @@ def ai_get_product_and_brands(content, prompt):
"temperature"
:
0
"temperature"
:
0
})
})
headers
=
{
headers
=
{
'Authorization'
:
'Bearer
fcc424e5-58af-494d-9683-5787413a26c9
'
,
'Authorization'
:
'Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
'
,
'Content-Type'
:
'application/json'
'Content-Type'
:
'application/json'
}
}
...
@@ -918,7 +895,7 @@ def _call_single_batch(brand_name, batch_articles):
...
@@ -918,7 +895,7 @@ def _call_single_batch(brand_name, batch_articles):
}
}
headers
=
{
headers
=
{
"Authorization"
:
"Bearer
fcc424e5-58af-494d-9683-5787413a26c9
"
,
"Authorization"
:
"Bearer
ark-7afc3be2-37a8-47fd-9f02-996258a3d305-27da0
"
,
"Content-Type"
:
"application/json"
"Content-Type"
:
"application/json"
}
}
...
@@ -1025,8 +1002,9 @@ if __name__ == '__main__':
...
@@ -1025,8 +1002,9 @@ if __name__ == '__main__':
'崔字牌'
,
'崔字牌'
,
'海南金永丰'
,
'海南金永丰'
,
'金永丰'
,
'金永丰'
,
# fcc424e5-58af-494d-9683-5787413a26c9
]
]
print
(
ai_get_brand_
sentiment_and_mentions
(
brand_list
,
content
))
print
(
ai_get_brand_
list
(
brand_list
,
content
))
# print(ai_result)
# print(ai_result)
# pro =
# pro =
# ai_get_product_list()
# ai_get_product_list()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment