mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
fix: task_str validation not required for trajectory replay (#6957)
This commit is contained in:
parent
e49b9243af
commit
34fa9ed4db
@ -247,17 +247,18 @@ if __name__ == '__main__':
|
||||
# Read task from file, CLI args, or stdin
|
||||
task_str = read_task(args, config.cli_multiline_input)
|
||||
|
||||
initial_user_action: Action = NullAction()
|
||||
if config.replay_trajectory_path:
|
||||
if task_str:
|
||||
raise ValueError(
|
||||
'User-specified task is not supported under trajectory replay mode'
|
||||
)
|
||||
else:
|
||||
if not task_str:
|
||||
raise ValueError('No task provided. Please specify a task through -t, -f.')
|
||||
|
||||
if not task_str:
|
||||
raise ValueError('No task provided. Please specify a task through -t, -f.')
|
||||
|
||||
# Create initial user action
|
||||
initial_user_action: MessageAction = MessageAction(content=task_str)
|
||||
# Create actual initial user action
|
||||
initial_user_action = MessageAction(content=task_str)
|
||||
|
||||
# Set session name
|
||||
session_name = args.name
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user