d60f1dc8e1
Add concurrent functions for QA generation Co-authored-by: edward_ke <edward_ke@trendmicro.com>
39 lines
911 B
Python
39 lines
911 B
Python
import os
|
|
|
|
"""
|
|
文件夹路径
|
|
"""
|
|
cur_dir = os.path.dirname(os.path.abspath(__file__)) # config
|
|
base_dir = os.path.dirname(cur_dir) # base
|
|
|
|
# model
|
|
model_dir = os.path.join(base_dir, 'model') # model
|
|
|
|
# data
|
|
data_dir = os.path.join(base_dir, 'data') # data
|
|
result_dir = os.path.join(data_dir, 'generated') # result
|
|
|
|
# log
|
|
log_dir = os.path.join(base_dir, 'log') # log
|
|
log_file_path = os.path.join(log_dir, 'log.log') # file
|
|
|
|
# system prompt
|
|
system_prompt_file_path = os.path.join(base_dir, 'system_prompt_v2.md') # system prompt
|
|
|
|
|
|
"""
|
|
环境变量
|
|
"""
|
|
# api-keys
|
|
DASHSCOPE_API_KEY = ''
|
|
|
|
|
|
|
|
"""
|
|
控制参数
|
|
"""
|
|
storage_interval = 10
|
|
window_size = 8
|
|
overlap_size = 2
|
|
multi_process_num = 3
|