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 type errors, pass collection id #1595

Merged
merged 1 commit into from
Nov 15, 2024
Merged

Fix type errors, pass collection id #1595

merged 1 commit into from
Nov 15, 2024

Conversation

NolanTrem
Copy link
Collaborator

@NolanTrem NolanTrem commented Nov 15, 2024

Important

Fix type errors and improve type hinting, ensuring correct collection ID passing in various functions.

  • Type Hinting Improvements:
    • Replace Union with | for type hinting in agent.py and ingestion_router.py.
    • Update type hints in retrieval_service.py and kg_service.py to use modern syntax.
  • Parameter Passing:
    • Ensure collection_ids are passed correctly in assign_document_to_collection_relational() in database.py.
    • Pass collection_ids in create_document() in documents_router.py.
  • Miscellaneous:
    • Add # type: ignore comments to suppress type errors in various files like ingestion_router.py and management_router.py.
    • Remove duplicate DocumentSearchResult class in responses.py.

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

@NolanTrem NolanTrem merged commit 731f861 into feature/api-v3 Nov 15, 2024
1 check failed
@NolanTrem NolanTrem deleted the Nolan/More branch November 15, 2024 19:17
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.

❌ Changes requested. Reviewed everything up to 6f2a968 in 1 minute and 36 seconds

More details
  • Looked at 700 lines of code in 22 files
  • Skipped 0 files when reviewing.
  • Skipped posting 6 drafted comments based on config settings.
1. py/core/base/agent/agent.py:6
  • Draft comment:
    Ensure the codebase is compatible with Python 3.10 or later, as the use of | for type hinting is a feature introduced in Python 3.10.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR includes changes to type annotations, specifically replacing Union with | for type hinting. This is a Python 3.10 feature, and the codebase should ensure compatibility with Python 3.10 or later.
2. py/core/base/agent/agent.py:30
  • Draft comment:
    Ensure the codebase is compatible with Python 3.10 or later, as the use of | for type hinting is a feature introduced in Python 3.10.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR includes changes to type annotations, specifically replacing Union with | for type hinting. This is a Python 3.10 feature, and the codebase should ensure compatibility with Python 3.10 or later.
3. py/core/base/agent/agent.py:134
  • Draft comment:
    Ensure the codebase is compatible with Python 3.10 or later, as the use of | for type hinting is a feature introduced in Python 3.10.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR includes changes to type annotations, specifically replacing Union with | for type hinting. This is a Python 3.10 feature, and the codebase should ensure compatibility with Python 3.10 or later.
4. py/core/main/api/v3/documents_router.py:126
  • Draft comment:
    Ensure the codebase is compatible with Python 3.10 or later, as the use of | for type hinting is a feature introduced in Python 3.10.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR includes changes to type annotations, specifically replacing Union with | for type hinting. This is a Python 3.10 feature, and the codebase should ensure compatibility with Python 3.10 or later.
5. py/core/main/api/v3/indices_router.py:241
  • Draft comment:
    Ensure the codebase is compatible with Python 3.10 or later, as the use of | for type hinting is a feature introduced in Python 3.10.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR includes changes to type annotations, specifically replacing Union with | for type hinting. This is a Python 3.10 feature, and the codebase should ensure compatibility with Python 3.10 or later.
6. py/core/main/api/v3/indices_router.py:625
  • Draft comment:
    Ensure the codebase is compatible with Python 3.10 or later, as the use of | for type hinting is a feature introduced in Python 3.10.
  • Reason this comment was not posted:
    Confidence changes required: 50%
    The PR includes changes to type annotations, specifically replacing Union with | for type hinting. This is a Python 3.10 feature, and the codebase should ensure compatibility with Python 3.10 or later.

Workflow ID: wflow_spmNcNwHSGKL6yMe


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

@@ -410,11 +410,11 @@ async def get_communities(
@telemetry_event("list_communities")
async def list_communities(
Copy link
Contributor

Choose a reason for hiding this comment

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

The list_communities function is a duplicate of the get_communities function. They perform the same operation with identical parameters and database calls, differing only in telemetry event name.

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