Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hash long href link #1500

Merged
merged 1 commit into from
Jan 6, 2025
Merged

hash long href link #1500

merged 1 commit into from
Jan 6, 2025

Conversation

LawyZheng
Copy link
Collaborator

@LawyZheng LawyZheng commented Jan 6, 2025

Important

This PR hashes long href links in HTML elements, storing them in a context map, and updates LLM handlers to render responses using these hashes.

  • Behavior:
    • Hashes href links longer than 300 characters in json_to_html() in scraper.py, storing them in SkyvernContext.hashed_href_map.
    • Renders LLM responses using hashed hrefs in llm_api_handler_with_router_and_fallback() and llm_api_handler() in api_handler_factory.py.
  • Models:
    • Adds hashed_href_map to SkyvernContext in skyvern_context.py.
    • Adds HASHED_HREF_MAP and LLM_RESPONSE_RENDERED to ArtifactType in models.py.
  • Storage:
    • Maps HASHED_HREF_MAP and LLM_RESPONSE_RENDERED to json in base.py.

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

@LawyZheng LawyZheng merged commit 6b4b52a into main Jan 6, 2025
2 checks passed
@LawyZheng LawyZheng deleted the lawy/hash-long-href-link branch January 6, 2025 15:26
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good to me! Reviewed everything up to e45ace0 in 1 minute and 25 seconds

More details
  • Looked at 233 lines of code in 6 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/webeye/scraper/scraper.py:106
  • Draft comment:
    The comment suggests hashing href links longer than 69 characters, but the code uses a threshold of 300 characters. Ensure the comment and code are consistent.
  • Reason this comment was not posted:
    Comment did not seem useful.

Workflow ID: wflow_LwaCcIYDKHbX8Ybx


You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant