feat(data-process): 支持思维链输出类型
This commit is contained in:
@@ -556,12 +556,16 @@ def _run_generation(
|
||||
if task["process_type"] == "unstructured"
|
||||
else _value(config, "qa_pairs_per_row", "qaPairsPerRow", 1)
|
||||
)
|
||||
output_type = str(
|
||||
_value(config, "output_type", "outputType", "standard")
|
||||
).strip().lower()
|
||||
if generation_model:
|
||||
runtime_config = {
|
||||
**config,
|
||||
"generation_prompt": _value(
|
||||
config, "generation_prompt", "generationPrompt", ""
|
||||
),
|
||||
"output_type": output_type,
|
||||
"max_tokens": _value(config, "max_tokens", "maxTokens", 1024),
|
||||
"json_mode": _value(config, "json_mode", "jsonMode", False),
|
||||
}
|
||||
@@ -583,6 +587,8 @@ def _run_generation(
|
||||
qa_pairs_per_item=int(pairs or 1),
|
||||
on_progress=report_progress,
|
||||
)
|
||||
elif output_type == "reasoning":
|
||||
raise InvalidStateError("思维链输出必须配置可用的数据生成模型")
|
||||
else:
|
||||
generated = generate_standard_records(
|
||||
preview_items,
|
||||
|
||||
Reference in New Issue
Block a user