This commit is contained in:
xming521
2025-07-10 09:59:40 +08:00
3 changed files with 7 additions and 1 deletions
+1
View File
@@ -29,6 +29,7 @@
"例如 密码",
"//....."
],
"add_time": false,
"single_combine_strategy": "time_window", // 单人组成单句策略
"qa_match_strategy": "time_window", // 组成qa策略
"single_combine_time_window": 2, // 单人组成单句时间窗口(分钟),
+5 -1
View File
@@ -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
+1
View File
@@ -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",