This repository was archived by the owner on Dec 28, 2025. It is now read-only.
forked from apache/incubator-hugegraph-ai
-
Notifications
You must be signed in to change notification settings - Fork 0
feat(llm):vector db #56
Open
fantasy-lotus
wants to merge
75
commits into
hugegraph:agenticrag/dev
Choose a base branch
from
fantasy-lotus:vector-db
base: agenticrag/dev
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
75 commits
Select commit
Hold shift + click to select a range
dae3e24
Refactor: Refactor Scheduler to Support Dynamic Workflow Scheduling a…
weijinglin 41aeae5
Refactor: Refactor hugegraph-ai to using CGraph & port some usecases …
weijinglin 78011d3
Refactor: text2germlin with PCgraph framework (#50)
fantasy-lotus 85e1296
Refactor RAG Workflow: Modularize Flows, Add Streaming, and Improve N…
weijinglin 591a0d1
feat(llm): index curd test passed
mikumifa 0692bca
feat(llm): some type bug && revert to FaissVectorIndex
mikumifa 70da993
feat(llm): some type bug
mikumifa 68fd974
feat(llm): some type bug(from mypy)
mikumifa 997d2e2
feat(llm): add License header
mikumifa 58777ff
feat(llm): import sort && change name
mikumifa 1a14a4b
feat(llm): vector db finished
mikumifa 9f7d64f
feat(llm): updata llm
mikumifa f470605
feat(llm): nexpected-keyword-arg,unused-import
mikumifa fce80a9
feat(llm): fit unitest
mikumifa f3a8a26
feat(llm): use lambda
mikumifa 77dd386
style: format code with black line-length 120
fantasy-lotus 8f3ba72
fix(security): add URL validation to avoid potential SSRF in test_api…
fantasy-lotus f90c1d5
small fix
fantasy-lotus 3561876
fix url
fantasy-lotus a1c128e
fix
fantasy-lotus 7eedb18
fix
fantasy-lotus 68e06fc
chore: mark vectordb optional
imbajin 6d088f7
fix cycle import & add docs
imbajin 12bf415
fix
fantasy-lotus 6d7c9ed
fix
fantasy-lotus f6fa0b7
fix
fantasy-lotus 6daf82c
fix schema g & prompt g
fantasy-lotus 17c72bc
fix black
fantasy-lotus 08f6857
fix
fantasy-lotus b78b051
fix: resolve leftover conflict markers and deps in hugegraph-llm/pypr…
fantasy-lotus 085e372
chore: clean remaining conflict markers by preferring PR-side chunks
fantasy-lotus 0a2e53d
fix: remove remaining conflict markers in operators and utils
fantasy-lotus 3c6a9ee
fix: finalize conflict marker cleanup in llm operators and utils
fantasy-lotus 895ba47
fix
fantasy-lotus e3d4ee1
feat(embeddings): drop QianFan provider and remove related configs
fantasy-lotus a4cfe05
feat(vector-index): UI config for Milvus/Qdrant and CUR_VECTOR_INDEX env
fantasy-lotus 6e31b87
refactor(nodes): unify embedding initialization via Embeddings().get_…
fantasy-lotus b446e4f
refactor(flow): use FaissVectorIndex + Embeddings for graph index info
fantasy-lotus 2df53b6
fix(embeddings): align wrappers with BaseEmbedding and async batch
fantasy-lotus 1893d64
style: apply black formatting with line-length 100
fantasy-lotus cb65760
fix pylint
fantasy-lotus 3571450
ci
fantasy-lotus 89151c2
feat: support batch build gremlin examples & delete some doc related …
weijinglin ff52f11
adopt some suggestions proposed by ai
weijinglin 1d56c5c
Merge upstream/agenticrag/dev: integrate flows/nodes architecture + p…
fantasy-lotus b1d08f8
fix: update imports for merged architecture
fantasy-lotus 6928338
fix: update graph_index_utils to use modular vector stores
fantasy-lotus bd89ab6
fix: use HEAD version of demo UI blocks
fantasy-lotus 3a75916
fix: add missing vector_index parameter to BuildSemanticIndex
fantasy-lotus a10730c
fix: remove KgBuilder and resolve circular import
fantasy-lotus 77343c2
fix: add missing vector_index parameter to BuildVectorIndex
fantasy-lotus d212091
fix: add missing vector_index parameter to VectorIndexQuery
fantasy-lotus c5e4bb0
fix: add missing vector_index parameter to SemanticIdQuery
fantasy-lotus 0c87dec
Merge upstream/vector-db: keep agenticrag/dev integration and fixes
fantasy-lotus ccc6b9a
fix: add missing vector_index parameter to BuildGremlinExampleIndex
fantasy-lotus 31de3b4
fix: add missing vector_index parameter to GremlinExampleIndexQuery
fantasy-lotus 0bdbf89
refactor: refactor scheduler to support dynamic workflow scheduling a…
weijinglin b90925a
refactor: refactor hugegraph-ai to integrate with CGraph & port some …
weijinglin d36d41d
refactor: text2germlin with PCGraph framework (#50)
fantasy-lotus 6ad8fd9
refactor(RAG workflow): modularize flows, add streaming, and improve …
weijinglin edae389
refactor: port batch build gremlin examples & delete some doc related…
weijinglin 8bbd29b
chore: commit staged changes before merge
fantasy-lotus 9ad00c0
Merge upstream/agenticrag/dev: integrate new flows/nodes architecture…
fantasy-lotus 4ba51ca
fix: update GetGraphIndexInfoFlow to use new vector index API
fantasy-lotus 66b0961
fix: update graph_index_utils to use new vector index API
fantasy-lotus 9690da7
fix conflicts
fantasy-lotus 90feadb
Update hugegraph-llm/src/hugegraph_llm/operators/index_op/build_seman…
fantasy-lotus e0797fe
Update hugegraph-llm/src/hugegraph_llm/indices/vector_index/milvus_ve…
fantasy-lotus e74e09c
Update hugegraph-llm/src/hugegraph_llm/demo/rag_demo/admin_block.py
fantasy-lotus 221effe
Update hugegraph-llm/src/hugegraph_llm/demo/rag_demo/app.py
fantasy-lotus b040918
fix(qdrant): use UUID for point IDs to prevent data loss from ID coll…
fantasy-lotus 9b67afd
Merge apache/main: integrate official upstream changes with vector-db…
fantasy-lotus 0ebbd98
Merge remote-tracking branch 'origin/vector-db' into vector-db
fantasy-lotus e74d11a
style: fix pylint issues (trailing whitespace, unused imports, line l…
fantasy-lotus 9ae2c12
style: suppress remaining pylint warnings with proper justifications
fantasy-lotus File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,11 +22,12 @@ description = "A tool for the implementation and research related to large langu | |
| authors = [ | ||
| { name = "Apache HugeGraph Contributors", email = "[email protected]" }, | ||
| ] | ||
| maintainers = [ | ||
| { name = "Apache HugeGraph Contributors", email = "[email protected]" }, | ||
| ] | ||
| readme = "README.md" | ||
| license = "Apache-2.0" | ||
| requires-python = ">=3.10,<3.12" | ||
|
|
||
|
|
||
| dependencies = [ | ||
| # Common dependencies | ||
| "decorator", | ||
|
|
@@ -39,9 +40,9 @@ dependencies = [ | |
| "numpy", | ||
| "pandas", | ||
| "pydantic", | ||
| "tqdm", | ||
| "scipy", | ||
| "python-igraph", | ||
|
|
||
|
|
||
| # LLM specific dependencies | ||
| "openai", | ||
|
|
@@ -63,6 +64,13 @@ dependencies = [ | |
| "hugegraph-python-client", | ||
| "pycgraph", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| vectordb = [ | ||
| "pymilvus==2.5.9", | ||
| "qdrant-client==1.14.2", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| homepage = "https://hugegraph.apache.org/" | ||
| repository = "https://github.com/apache/incubator-hugegraph-ai" | ||
|
|
@@ -92,3 +100,22 @@ hugegraph-python-client = { workspace = true } | |
| # We encountered a bug in PyCGraph's latest release version, so we're using a specific commit from the main branch (without the bug) as the project dependency. | ||
| # TODO: Replace this command in the future when a new PyCGraph release version (after 3.1.2) is available. | ||
| pycgraph = { git = "https://github.com/ChunelFeng/CGraph.git", subdirectory = "python", rev = "248bfcfeddfa2bc23a1d585a3925c71189dba6cc"} | ||
|
|
||
| [tool.mypy] | ||
| disable_error_code = ["import-untyped"] | ||
| check_untyped_defs = true | ||
| disallow_untyped_defs = false | ||
|
|
||
| [tool.ruff] | ||
| line-length = 120 | ||
| indent-width = 4 | ||
| extend-exclude = [] | ||
|
|
||
| # TODO: move this config in the root pyproject.toml & add more rules for it | ||
| [tool.ruff.lint] | ||
| extend-select = ["I"] | ||
|
|
||
| [tool.ruff.format] | ||
| quote-style = "preserve" | ||
| indent-style = "space" | ||
| line-ending = "auto" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| # Licensed to the Apache Software Foundation (ASF) under one | ||
| # or more contributor license agreements. See the NOTICE file | ||
| # distributed with this work for additional information | ||
| # regarding copyright ownership. The ASF licenses this file | ||
| # to you under the Apache License, Version 2.0 (the | ||
| # "License"); you may not use this file except in compliance | ||
| # with the License. You may obtain a copy of the License at | ||
| # | ||
| # http://www.apache.org/licenses/LICENSE-2.0 | ||
| # | ||
| # Unless required by applicable law or agreed to in writing, | ||
| # software distributed under the License is distributed on an | ||
| # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
| # KIND, either express or implied. See the License for the | ||
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| import os | ||
| from typing import Optional | ||
|
|
||
| from .models import BaseConfig | ||
|
|
||
|
|
||
| class IndexConfig(BaseConfig): | ||
| """LLM settings""" | ||
|
|
||
| qdrant_host: Optional[str] = os.environ.get("QDRANT_HOST", None) | ||
| qdrant_port: int = int(os.environ.get("QDRANT_PORT", "6333")) | ||
| qdrant_api_key: Optional[str] = ( | ||
| os.environ.get("QDRANT_API_KEY") if os.environ.get("QDRANT_API_KEY") else None | ||
| ) | ||
|
|
||
| milvus_host: Optional[str] = os.environ.get("MILVUS_HOST", None) | ||
| milvus_port: int = int(os.environ.get("MILVUS_PORT", "19530")) | ||
| milvus_user: str = os.environ.get("MILVUS_USER", "") | ||
| milvus_password: str = os.environ.get("MILVUS_PASSWORD", "") | ||
|
|
||
| cur_vector_index: str = os.environ.get("CUR_VECTOR_INDEX", "Faiss") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.