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

feat: support AnalyticDB vector store #5586

Merged
merged 1 commit into from
Jul 9, 2024
Merged

Conversation

lpdink
Copy link
Contributor

@lpdink lpdink commented Jun 25, 2024

Description

  • AnalyticDB offers enterprise-level vector database services tailored for generative AI applications. For further information, please see here
  • This PR utilizes alibabacloud_gpdb20160503 and alibabacloud_tea_openapi for database connectivity. It leverages a pure HTTP client architecture, hence a Docker image is not provided.
  • Implemented and successfully executed AnalyticDBTest using certain AK/SK.
  • Due to local issues with Poetry, this PR does not directly add new dependencies to pyproject.toml. Could a maintainer kindly add the following dependencies?
poetry add alibabacloud_gpdb20160503="~3.8.0"
poetry add alibabacloud_tea_openapi="~0.3.9"

Type of Change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update, included: Dify Document
  • Improvement, including but not limited to code refactoring, performance optimization, and UI/UX improvement
  • Dependency upgrade

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • Added the AnalyticdbVectorTest integration test which successfully passed using certain service credentials (AK/SK).

Suggested Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods
  • optional I have made corresponding changes to the documentation
  • optional I have added tests that prove my fix is effective or that my feature works
  • optional New and existing unit tests pass locally with my changes

@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. 💪 enhancement New feature or request labels Jun 25, 2024
api/configs/middleware/vdb/analyticdb_config.py Outdated Show resolved Hide resolved
api/configs/middleware/vdb/analyticdb_config.py Outdated Show resolved Hide resolved
api/configs/middleware/vdb/analyticdb_config.py Outdated Show resolved Hide resolved
api/configs/middleware/vdb/analyticdb_config.py Outdated Show resolved Hide resolved
api/configs/middleware/vdb/analyticdb_config.py Outdated Show resolved Hide resolved
@bowenliang123
Copy link
Contributor

As for the dependencies, add the required packages to the pyproject.toml, and then use dev/sync-poetry to update the poetry lockfile.

And I'm new to ADB concepts, any reference or ADB docs for alibabacloud_gpdb20160503 and alibabacloud_tea_openapi . The package name sound abnormal to me especially the exact date inside the name which may indicate an version or compatibility issue? Why we would have it?

api/poetry.lock Outdated Show resolved Hide resolved
@lpdink
Copy link
Contributor Author

lpdink commented Jun 25, 2024

@bowenliang123

As for the dependencies, add the required packages to the pyproject.toml, and then use dev/sync-poetry to update the poetry lockfile.

And I'm new to ADB concepts, any reference or ADB docs for alibabacloud_gpdb20160503 and alibabacloud_tea_openapi . The package name sound abnormal to me especially the exact date inside the name which may indicate an version or compatibility issue? Why we would have it?

Done, Thank you for your suggestion. I added the specific description and updated pyproject.toml . As for the naming of alibabacloud_gpdb20160503 , this is named according to the implementation time of the first API, but the module itself is newest and continuously maintained. The quick start of AnalyticDB also added to config, here

@bowenliang123
Copy link
Contributor

cc @JohnJyong

@bowenliang123
Copy link
Contributor

@lpdink lpdink force-pushed the main branch 3 times, most recently from 2815d74 to 90eb889 Compare June 28, 2024 04:08
@lpdink
Copy link
Contributor Author

lpdink commented Jun 28, 2024

@bowenliang123 Hey, The alibabacloud-tea has released version 0.3.7, and I've updated the poetry.lock. Now, urllib3 will no longer be downgraded. Could you please approve with this PR?

@lpdink
Copy link
Contributor Author

lpdink commented Jun 28, 2024

@laipz8200 Hey, could you please review this PR?

@lpdink
Copy link
Contributor Author

lpdink commented Jul 1, 2024

@JohnJyong Hey, I'm really sorry to bother you, but could you please kindly review this PR?

@bowenliang123
Copy link
Contributor

LGTM overall. And how about resolving the conflicts first, considering many changes in configs and docker file merged recently.

@lpdink
Copy link
Contributor Author

lpdink commented Jul 9, 2024

@bowenliang123 I'm really sorry to bother you, but could you please remind the other reviewers to approve this PR?

@bowenliang123
Copy link
Contributor

bowenliang123 commented Jul 9, 2024

Hi @lpdink , this PR is good for me. Feel free to ask Dify's member to review this PR, as I'm not one of them although I had some work in vdb features implementation and tests. cc @takatost @JohnJyong

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 9, 2024
@JohnJyong JohnJyong merged commit 7c70eb8 into langgenius:main Jul 9, 2024
5 checks passed
ZhouhaoJiang added a commit that referenced this pull request Jul 9, 2024
* refs/heads/main: (51 commits)
  feat: tailwind related improvement (#6085)
  feat: support AnalyticDB vector store (#5586)
  feat:add tts-streaming config and future (#5492)
  Feat: add index bar to select tool panel of workflow (#6066)
  bump to 0.6.13 (#6078)
  fix: Inconsistency Between Actual and Debug Input Variables (#6055)
  refactor: revamp picker block (#4227)
  chore: remove tsne unused code (#6077)
  fix: relative in overflow div (#5998)
  chore(action): move docker login above Set up QEMU in build-push action workflow (#6073)
  remove clunky welcome message (#6069)
  feat: add request_params field to jina_reader tool (#5610)
  fix azure stream download (#6063)
  chore: hide tracing introduce detail (#6049)
  Address the issue of the absence of poetry in the development container. (#6036)
  Fix authorization header validation to handle bearer types correctly - "authorization config header is required" error (#6040)
  Fix/6034 get random order of categories in explore and workflow is missing in zh hant (#6043)
  Modify slack webhook url validation to allow workflow (#6041) (#6042)
  fix(configs): Update pydantic settings in config files (#6023)
  Fix/incorrect parameter extractor memory (#6038)
  ...
ZhouhaoJiang added a commit that referenced this pull request Jul 9, 2024
* refs/heads/feat/if-elif:
  feat: update if elif
  feat: tailwind related improvement (#6085)
  feat: support AnalyticDB vector store (#5586)

# Conflicts:
#	web/app/components/header/account-setting/members-page/invite-modal/index.tsx
#	web/app/components/header/account-setting/members-page/operation/index.tsx
#	web/app/components/workflow/nodes/if-else/components/condition-item.tsx
#	web/app/components/workflow/nodes/if-else/components/condition-list.tsx
@takatost takatost mentioned this pull request Jul 15, 2024
@Gaocarri
Copy link
Contributor

@lpdink sorry to bother u, have you tried migrating pg to adb? I encountered some problems

@lpdink
Copy link
Contributor Author

lpdink commented Jul 27, 2024

@lpdink sorry to bother u, have you tried migrating pg to adb? I encountered some problems

@Gaocarri I'm glad to help. Could you provide more details about the problem ?

@Gaocarri
Copy link
Contributor

@lpdink sorry to bother u, have you tried migrating pg to adb? I encountered some problems

@Gaocarri I'm glad to help. Could you provide more details about the problem ?

thanks your help!

i create a discussion for my problem: #6720

i changed the docker/.env

DB_USERNAME=xxx
DB_PASSWORD=xxx
DB_HOST=xx
DB_PORT=xx
DB_DATABASE=xx

i can use psql to connect adb in container, but some troubles。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
💪 enhancement New feature or request 👻 feat:rag Embedding related issue, like qdrant, weaviate, milvus, vector database. lgtm This PR has been approved by a maintainer size:L This PR changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants