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

Fix the prompt cache window - use settings.PROMPT_CACHE_WINDOW_HOURS #769

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

wintonzheng
Copy link
Contributor

@wintonzheng wintonzheng commented Sep 3, 2024

🚀 This description was created by Ellipsis for commit 91fd886

Summary:

Replaced hardcoded PROMPT_CACHE_WINDOW_HOURS with dynamic configuration using SettingsManager.get_settings() in generate_task, affecting skyvern/forge/sdk/routes/agent_protocol.py and skyvern/forge/sdk/db/client.py.

Key points:

  • Replaced hardcoded PROMPT_CACHE_WINDOW_HOURS with SettingsManager.get_settings().PROMPT_CACHE_WINDOW_HOURS for dynamic configuration.
  • Removed hardcoded value from skyvern/forge/sdk/routes/agent_protocol.py.
  • Updated generate_task function to use dynamic configuration.
  • Modified query_window_hours parameter in get_task_generation_by_prompt_hash.
  • Changes affect skyvern/forge/sdk/db/client.py.

Generated with ❤️ by ellipsis.dev

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 b58c9f6 in 8 seconds

More details
  • Looked at 22 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/routes/agent_protocol.py:777
  • Draft comment:
    Ensure that SettingsManager.get_settings().PROMPT_CACHE_WINDOW_HOURS is used consistently across the codebase wherever PROMPT_CACHE_WINDOW_HOURS is needed. This ensures that any changes to the setting are reflected throughout the application.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR changes a constant to a dynamic setting retrieval, which is a good practice for flexibility. However, the change should be consistent across the codebase.

Workflow ID: wflow_NVRhF3YsYiizbTUW


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

@wintonzheng wintonzheng force-pushed the shu/PROMPT_CACHE_WINDOW_HOURS_config branch from b58c9f6 to 91fd886 Compare September 3, 2024 04:15
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! Incremental review on 91fd886 in 20 seconds

More details
  • Looked at 35 lines of code in 2 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. skyvern/forge/sdk/db/client.py:1426
  • Draft comment:
    SettingsManager is not imported in this file. Add from skyvern.forge.sdk.settings_manager import SettingsManager to avoid NameError.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment seems to be incorrect because the code change is related to a setting name change, not an issue with SettingsManager. The import for settings is already present, and there is no indication that SettingsManager is needed. The comment does not address a change made in the diff.
    I might be missing some context about SettingsManager if it is used elsewhere in the file, but the comment should only address changes made in the diff. The comment does not seem relevant to the change made.
    The comment is not relevant to the specific change made in the diff, which is a setting name change. There is no indication that SettingsManager is needed for this change.
    The comment about importing SettingsManager is not relevant to the change made in the diff and should be removed.

Workflow ID: wflow_F8Nfjb29OXkUUsVj


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

@wintonzheng wintonzheng changed the title use SettingsManager.get_settings().PROMPT_CACHE_WINDOW_HOURS Fix the prompt cache window - use settings.PROMPT_CACHE_WINDOW_HOURS Sep 3, 2024
@wintonzheng wintonzheng merged commit 63ebe75 into main Sep 3, 2024
2 checks passed
@wintonzheng wintonzheng deleted the shu/PROMPT_CACHE_WINDOW_HOURS_config branch September 3, 2024 04:32
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