Skip to content

Conversation

@DhruvGorasiya
Copy link
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Screenshots

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Oct 16, 2025
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @DhruvGorasiya, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses a logical error in Weaviate distance calculation and updates the Weaviate client and server versions to 4.17.0 and 1.27.0 respectively. It includes necessary dependency pinning, temporary Docker Compose adjustments for the client update, and a detailed migration guide to assist users in upgrading their Weaviate instances. The changes aim to improve accuracy, leverage newer Weaviate features like gRPC for faster operations, and provide clear instructions for a smooth transition.

Highlights

  • Weaviate Distance Calculation Fix: Corrected a logical error in weaviate_vector.py to explicitly handle None values for obj.metadata.distance, ensuring 1.0 is used as a fallback when the distance is not available.
  • Weaviate Client Version Pin: Updated and pinned the weaviate-client Python package to version 4.17.0 across pyproject.toml and uv.lock to ensure compatibility with the updated Weaviate server.
  • Docker Compose Adjustments: Introduced temporary entrypoint overrides in Docker Compose files (docker-compose-template.yaml, docker-compose.yaml) to ensure weaviate-client==4.17.0 is installed at runtime, and removed an empty profile entry from the Weaviate service definition.
  • Weaviate Migration Guide: Added a comprehensive README.md document detailing the migration process from Weaviate v1.19 to v1.27, including breaking changes, improvements, step-by-step instructions for Docker and source installations, troubleshooting, and rollback procedures.
Ignored Files
  • Ignored by pattern: .github/workflows/** (1)
    • .github/workflows/expose_service_ports.sh
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@dosubot dosubot bot added the 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. label Oct 16, 2025
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request correctly addresses a logical error in the Weaviate distance calculation, ensuring that a distance of 0.0 is handled properly. The dependency on weaviate-client is also pinned to a specific version, which improves build reproducibility. The addition of a detailed Weaviate migration guide is a valuable contribution for users. My review includes suggestions to improve code conciseness in the distance calculation, enhance maintainability in the Docker Compose files by reducing duplication, and fix minor formatting issues in the new documentation to improve clarity.

DhruvGorasiya and others added 2 commits October 16, 2025 14:20
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@dosubot dosubot bot added size:S This PR changes 10-29 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Oct 16, 2025
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Oct 16, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Oct 17, 2025
@crazywoola crazywoola merged commit d19c100 into langgenius:main Oct 17, 2025
12 checks passed
CodingOnStar pushed a commit that referenced this pull request Oct 20, 2025
Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
LawrenceZHLee pushed a commit to LawrenceZHLee/dify that referenced this pull request Oct 28, 2025
Co-authored-by: crazywoola <427733928@qq.com>
Co-authored-by: crazywoola <100913391+crazywoola@users.noreply.github.com>
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants