fix: make system prompt optional across scripts

- stream_chat: default empty system_prompt, single-turn mode
- generate_batch: drop hardcoded system role
- generate.py: preserve original fields in messages branch
  and use response_key for the output column name
This commit is contained in:
2026-07-18 14:10:37 +08:00
parent 9d3ccfdffc
commit 28886e4241
3 changed files with 13 additions and 13 deletions
+2 -1
View File
@@ -99,7 +99,8 @@ def processor(
for i, prompt in enumerate(chunk):
if input_data and "messages" in input_data[0]:
output_item = {"response": resp_chunk[i]}
orig = input_data[chunk_start + i]
output_item = {**orig, response_key: resp_chunk[i]}
else:
output_item = {
question_key: prompt,