mirror of
https://github.com/agentscope-ai/ReMe.git
synced 2026-08-28 05:25:04 +00:00
feat(file_tool): add save_answer option to BatchWriteFileOp
This commit is contained in:
parent
396f9c7e6b
commit
660eed93bb
2 changed files with 5 additions and 2 deletions
|
|
@ -243,7 +243,6 @@ llm:
|
|||
params:
|
||||
temperature: 0.6
|
||||
token_count: # Optional
|
||||
model_name: Qwen/Qwen3-30B-A3B-Instruct-2507
|
||||
backend: base
|
||||
|
||||
qwen3_30b_instruct:
|
||||
|
|
|
|||
|
|
@ -20,6 +20,10 @@ class BatchWriteFileOp(BaseAsyncOp):
|
|||
WriteFileOp. Returns a combined result of all write operations.
|
||||
"""
|
||||
|
||||
def __init__(self, save_answer: bool = False, **kwargs):
|
||||
super().__init__(**kwargs)
|
||||
self.save_answer: bool = save_answer
|
||||
|
||||
async def async_execute(self):
|
||||
"""Execute the batch write file operation.
|
||||
|
||||
|
|
@ -37,7 +41,7 @@ class BatchWriteFileOp(BaseAsyncOp):
|
|||
# Process each file in the dictionary
|
||||
result = []
|
||||
for file_path, content in write_file_dict.items():
|
||||
write_op = WriteFileOp()
|
||||
write_op = WriteFileOp(save_answer=self.save_answer)
|
||||
await write_op.async_call(file_path=file_path, content=content)
|
||||
result.append(write_op.output)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue