mirror of
https://github.com/simular-ai/Agent-S.git
synced 2026-08-30 16:56:25 +08:00
Merge pull request #156 from maxwellVisual/main
This commit is contained in:
@@ -315,6 +315,11 @@ def main():
|
||||
default=False,
|
||||
help="Enable local coding environment for code execution (WARNING: Executes arbitrary code locally)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--task",
|
||||
type=str,
|
||||
help="The task instruction for Agent-S3 to perform.",
|
||||
)
|
||||
|
||||
args = parser.parse_args()
|
||||
|
||||
@@ -368,6 +373,14 @@ def main():
|
||||
enable_reflection=args.enable_reflection,
|
||||
)
|
||||
|
||||
task = args.task
|
||||
|
||||
# handle query from command line
|
||||
if isinstance(task, str) and task.strip():
|
||||
agent.reset()
|
||||
run_agent(agent, query, scaled_width, scaled_height)
|
||||
return
|
||||
|
||||
while True:
|
||||
query = input("Query: ")
|
||||
|
||||
@@ -380,6 +393,5 @@ def main():
|
||||
if response.lower() != "y":
|
||||
break
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user