julep-ai / julep

A new DSL and server for AI agents and multi-step tasks
https://julep.ai
Apache License 2.0
2.67k stars 904 forks source link

fix: many miscellaneous fixes to integrations and agents API #796

Closed creatorrr closed 4 weeks ago

creatorrr commented 4 weeks ago

[!IMPORTANT] Refines Remote Browser functionality by removing wait_for_load, updating models, and enhancing PlaywrightActions with error handling and screenshot capabilities.

  • Behavior:
    • Removed wait_for_load action from RemoteBrowserArguments and RemoteBrowserArgumentsUpdate.
    • Updated task_to_spec() in tasks.py to exclude task_id, id, and agent_id.
    • Modified create_task() and create_or_update_task() to return query results directly.
  • Models:
    • Updated RemoteBrowserSetup to remove RemoteBrowserSetupUpdate and its fields.
    • Refined RemoteBrowserOutput to include output, error, base64_image, and system fields.
  • Functions:
    • Enhanced PlaywrightActions with _with_error_and_screenshot decorator for error handling and screenshots.
    • Added methods _get_screen_size(), _set_screen_size(), _wait_for_load(), _execute_javascript(), _set_window_vars(), _get_mouse_coordinates(), and _get_element_coordinates().
  • Misc:
    • Removed spec_to_task import from get_task.py and list_tasks.py.

This description was created by Ellipsis for c8ef19679ce4ed096486264ccbf21f0b8d59b41b. It will automatically update as commits are pushed.

sweep-ai[bot] commented 4 weeks ago

Hey @creatorrr, here is an example of how you can ask me to improve this pull request:

@sweep Add unit tests for the `_with_error_and_screenshot` decorator in `PlaywrightActions` class to verify:
- Error handling and proper error message propagation
- Screenshot capture during successful operations
- Proper combination of output and screenshot in the returned RemoteBrowserOutput

:book: For more information on how to use Sweep, please read our documentation.