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(agents-api,integrations): Misc fixes and tenacity retry in integrations" #710

Merged
merged 4 commits into from
Oct 19, 2024

Conversation

creatorrr
Copy link
Contributor

@creatorrr creatorrr commented Oct 19, 2024

  • fix(integrations): General upkeep + tenacity retry
  • feat(agents-api): Misc fixes in agents-api

Important

Add tenacity retry logic to integration functions, remove unused integrations, and improve agents-api and integrations services.

  • Integrations:
    • Add tenacity retry logic to search() in brave.py, load() in browserbase.py, send() in email.py, crawl() in spider.py, get() in weather.py, and search() in wikipedia.py.
    • Remove unused integrations: dalle_image_generator.py, duckduckgo_search.py, gmail/send_mail.py, hacker_news.py, and request.py.
    • Remove hacker_news provider from providers.py.
  • Agents API:
    • Update log_step() in log_step.py to include include_remote=True in context.model_dump().
    • Add NEWLINE constant to utils.py and template.py.
    • Add ApplicationError to non-retryable exceptions in interceptors.py.
    • Increase sleep time in test_doc() in fixtures.py from 0.1 to 0.5 seconds.
  • Misc:
    • Remove unused imports in base_models.py, email.py, wikipedia.py, get_integration.py, and execute_integration.py.
    • Add tenacity to pyproject.toml dependencies.

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

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 54e04a0 in 30 seconds

More details
  • Looked at 483 lines of code in 25 files
  • Skipped 1 files when reviewing.
  • Skipped posting 2 drafted comments based on config settings.
1. integrations-service/integrations/utils/integrations/wikipedia.py:12
  • Draft comment:
    Consider making the search function asynchronous if it is intended to be used in an async context.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The search function in integrations-service/integrations/utils/integrations/wikipedia.py is defined as a synchronous function but is being used in an asynchronous context. This could lead to issues if the function is expected to be awaited.
2. integrations-service/integrations/routers/execution/execute.py:22
  • Draft comment:
    Rename one of the execute functions to avoid name collision and potential logical errors.
  • Reason this comment was not posted:
    Decided after close inspection that this draft comment was likely wrong and/or not actionable:
    The comment points out a potential issue with having two functions with the same name, which could lead to confusion or errors in the future. While Python allows function overloading based on parameters, having two functions with the same name in the same file can be confusing for developers. The comment is actionable and suggests a clear refactor to improve code quality.
    The functions are differentiated by their parameters, so technically there is no collision in Python. However, the comment is about code readability and maintainability, which is a valid concern.
    Even though Python allows this, the comment is about improving code readability and maintainability, which is important for long-term code quality.
    The comment is valid as it suggests a code quality improvement by renaming one of the 'execute' functions to avoid confusion, even though there is no technical collision.

Workflow ID: wflow_sYSlkeTSIE0c1ioX


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

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 55fe24a in 11 seconds

More details
  • Looked at 25 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 1 drafted comments based on config settings.
1. .github/workflows/translate-readme.yml:45
  • Draft comment:
    Add a newline at the end of the file for better compatibility with Unix-based systems.
  • Reason this comment was not posted:
    Confidence changes required: 33%
    The workflow file is missing a newline at the end, which is a best practice for text files.

Workflow ID: wflow_2eR9dQ5Uix4Zh2OW


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

@creatorrr creatorrr merged commit 12f8698 into dev Oct 19, 2024
5 of 6 checks passed
@creatorrr creatorrr deleted the x/fix-integrations-service branch October 19, 2024 04:27
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