Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions workflows/workflow_use/builder/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ async def build_workflow_from_path(
self, path: Path, user_goal: str
) -> WorkflowDefinitionSchema:
"""Build a workflow from a JSON file path."""
with open(path, "r") as f:
with open(path, "r", encoding="utf-8") as f:
workflow_data = json.load(f)

workflow_data_schema = WorkflowDefinitionSchema.model_validate(workflow_data)
Expand All @@ -337,5 +337,5 @@ async def save_workflow_to_path(
self, workflow: WorkflowDefinitionSchema, path: Path
):
"""Save a workflow to a JSON file path."""
with open(path, "w") as f:
with open(path, "w", encoding="utf-8") as f:
json.dump(workflow.model_dump(mode="json"), f, indent=2)