add file viewer; allow file uploads; write plan to json

This commit is contained in:
yadong-lu
2025-03-12 18:33:21 -07:00
parent 09ca3a8f1f
commit 23aa125276
4 changed files with 819 additions and 15 deletions

View File

@@ -48,7 +48,8 @@ def sampling_loop_sync(
api_key: str,
only_n_most_recent_images: int | None = 2,
max_tokens: int = 4096,
omniparser_url: str
omniparser_url: str,
save_folder: str = "./uploads"
):
"""
Synchronous agentic sampling loop for the assistant/tool interaction of computer use.
@@ -83,7 +84,8 @@ def sampling_loop_sync(
api_response_callback=api_response_callback,
output_callback=output_callback,
max_tokens=max_tokens,
only_n_most_recent_images=only_n_most_recent_images
only_n_most_recent_images=only_n_most_recent_images,
save_folder=save_folder
)
else:
raise ValueError(f"Model {model} not supported")