mirror of
https://github.com/xming521/WeClone.git
synced 2026-08-28 18:07:28 +08:00
Merge branch 'dev' of https://github.com/xming521/WeClone into dev
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
"例如 密码",
|
||||
"//....."
|
||||
],
|
||||
"add_time": false,
|
||||
"single_combine_strategy": "time_window", // 单人组成单句策略
|
||||
"qa_match_strategy": "time_window", // 组成qa策略
|
||||
"single_combine_time_window": 2, // 单人组成单句时间窗口(分钟),
|
||||
|
||||
@@ -278,13 +278,17 @@ class DataProcessor:
|
||||
)
|
||||
return qa_id
|
||||
|
||||
system_content = self.system_prompt
|
||||
if self.c.add_time:
|
||||
system_content += f" Current datetime: {time_stamp.strftime('%Y-%m-%d %H:%M:%S')}"
|
||||
|
||||
qa_pair = self.QaPair(
|
||||
id=qa_id,
|
||||
time=time_stamp,
|
||||
score=0,
|
||||
messages=current_conversation_messages.copy(),
|
||||
images=current_conversation_images.copy(),
|
||||
system=self.system_prompt,
|
||||
system=system_content,
|
||||
)
|
||||
qa_res.append(qa_pair)
|
||||
return qa_id + 1
|
||||
|
||||
@@ -134,6 +134,7 @@ class MakeDatasetArgs(BaseConfigModel):
|
||||
include_type: List[DataModality] = Field([DataModality.TEXT], description="Types of data to include")
|
||||
max_image_num: int = Field(2, description="Maximum number of images per single data entry")
|
||||
blocked_words: List[str] = Field([], description="List of blocked words")
|
||||
add_time: bool = Field(False, description="Whether to add time to the dataset")
|
||||
single_combine_strategy: CombineStrategy = Field(
|
||||
CombineStrategy.TIME_WINDOW,
|
||||
description="Strategy for combining single person's messages into a single sentence",
|
||||
|
||||
Reference in New Issue
Block a user