Copilot commented on code in PR #287:
URL: 
https://github.com/apache/incubator-hugegraph-ai/pull/287#discussion_r2215435062


##########
vermeer-python-client/pyproject.toml:
##########
@@ -16,38 +16,48 @@
 # under the License.
 
 [project]
-name = "vermeer-python-client"
-version = "1.5.0"
-description = "A Python SDK for Apache Vermeer."
+name = "vermeer-python-client" # Standardized name
+version = "0.1.0" # From setup.py

Review Comment:
   The version has been downgraded from 1.5.0 to 0.1.0. This significant 
version change should be intentional and documented, as it may indicate a 
breaking change or reset in the module's versioning.
   ```suggestion
   version = "0.1.0" # Version reset to 0.1.0 to signify a new project or major 
restructuring. Previously 1.5.0.
   ```



##########
pyproject.toml:
##########
@@ -0,0 +1,160 @@
+# 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.
+
+[project]
+name = "hugegraph-ai"
+version = "1.5.0" # Assuming a common version, adjust if necessary
+description = "A repository for AI-related projects for Apache HugeGraph."
+authors = [
+    { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
+]
+readme = "README.md"
+license = "Apache-2.0"
+requires-python = ">=3.10" # Adjusted to the highest requirement among 
submodules (hugegraph-llm)
+maintainers = [
+    { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
+]
+
+dependencies = [
+    # Common dependencies can be listed here if any,
+    # but it's generally better to keep them within extras for clarity
+]
+
+[project.optional-dependencies]
+llm = [
+    "hugegraph-llm",
+    "openai~=1.61.0",
+    "ollama~=0.4.8",
+    "qianfan~=0.3.18",
+    "retry~=0.9.2",
+    "tiktoken~=0.7.0",
+    "nltk~=3.9.1",
+    "gradio~=5.20.0",
+    "jieba~=0.42.1",
+    # numpy is also in ml, pinning to the version required by llm (>=1.24.4)
+    "numpy~=1.24.4",
+    "python-docx~=1.1.2",
+    "langchain-text-splitters~=0.2.2",
+    "faiss-cpu~=1.8.0",
+    "python-dotenv~=1.0.1",
+    "pyarrow~=17.0.0",
+    # pandas is also in ml, pinning to the version required by llm (<2.2.2)
+    "pandas~=2.2.3",
+    "openpyxl~=3.1.5",
+    "pydantic-settings~=2.6.1",
+    # decorator is also in python-client and vermeer
+    "decorator~=5.1.1",
+    # requests is also in python-client and vermeer
+    "requests~=2.32.0",
+    # setuptools is also in python-client and vermeer
+    "setuptools~=70.0.0",
+    # urllib3 is also in python-client and vermeer
+    "urllib3~=2.2.2",
+    # rich is also in python-client and vermeer
+    "rich~=13.9.4",
+    "apscheduler~=3.10.4",
+    "litellm~=1.61.13",
+]
+ml = [
+    "hugegraph-ml",
+    "dgl~=2.1.0",
+    "ogb~=1.3.6",
+    # pandas is also in llm, ensure version compatibility. llm: <2.2.2, ml: 
~2.2.3. This needs resolution.
+    # For now, let's use the stricter one from llm. If ml truly needs 2.2.3, 
this will be an issue.
+    "pandas~=2.2.3",
+    "catboost~=1.2.3",
+    "category_encoders~=2.6.3",
+    # numpy is also in llm
+    "numpy~=1.24.4",
+    "torch==2.2.0",
+    "tqdm~=4.66.5",
+    "packaging~=24.1",
+    "torchdata~=0.7.0",
+    "PyYAML~=6.0.2",
+    "pydantic~=2.10.6",
+]
+python-client = [
+    "hugegraph-python-client",
+    # Dependencies already listed in llm's optional-dependencies, so they will 
be included
+    # if both llm and python-client are installed.
+    # "decorator~=5.1.1",
+    # "requests~=2.32.0",
+    # "setuptools~=70.0.0", To handle version conflicts, change to 
"setuptools~=78.1.1",
+    # "urllib3~=2.2.2",
+    # "rich~=13.9.4",
+]
+vermeer = [
+    "vermeer-python-client", # This will be the new name for 
vermeer-python-client package
+    # Dependencies from vermeer's requirements.txt
+    # "decorator~=5.1.1", # Already in llm
+    # "requests~=2.32.0", # Already in llm
+    # "setuptools~=78.1.1", # Version conflict with llm (70.0.0). Using llm's 
version.
+    # "urllib3~=2.2.2", # Already in llm
+    # "rich~=13.9.4", # Already in llm
+    "python-dateutil~=2.9.0",
+]
+all = [
+    "hugegraph-ai[llm,ml,python-client,vermeer]",
+]
+
+
+[project.urls]
+homepage = "https://hugegraph.apache.org/";
+repository = "https://github.com/apache/incubator-hugegraph-ai";
+documentation = "https://hugegraph.apache.org/docs/quickstart/hugegraph-ai/"; # 
General AI docs
+"Bug Tracker" = "https://github.com/apache/incubator-hugegraph-ai/issues";
+
+[build-system]
+requires = ["hatchling"]
+build-backend = "hatchling.build"
+
+# Comment explaining that this is an example and can be overridden
+# [[tool.uv.index]]
+# url = "https://pypi.tuna.tsinghua.edu.cn/simple"; # Example mirror for users 
in China
+# default = true
+#
+# Users can override this in their personal configuration with:
+# uv config --global index.url https://pypi.org/simple
+default = true

Review Comment:
   This `default = true` line appears to be orphaned configuration without a 
proper section header. It should be removed or placed under the correct 
`[[tool.uv.index]]` section if index configuration is intended.
   ```suggestion
   [[tool.uv.index]]
   url = "https://pypi.tuna.tsinghua.edu.cn/simple"; # Example mirror for users 
in China
   default = true
   
   # Users can override this in their personal configuration with:
   # uv config --global index.url https://pypi.org/simple
   ```



##########
pyproject.toml:
##########
@@ -0,0 +1,160 @@
+# 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.
+
+[project]
+name = "hugegraph-ai"
+version = "1.5.0" # Assuming a common version, adjust if necessary
+description = "A repository for AI-related projects for Apache HugeGraph."
+authors = [
+    { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
+]
+readme = "README.md"
+license = "Apache-2.0"
+requires-python = ">=3.10" # Adjusted to the highest requirement among 
submodules (hugegraph-llm)
+maintainers = [
+    { name = "Apache HugeGraph Contributors", email = 
"[email protected]" },
+]
+
+dependencies = [
+    # Common dependencies can be listed here if any,
+    # but it's generally better to keep them within extras for clarity
+]
+
+[project.optional-dependencies]
+llm = [
+    "hugegraph-llm",
+    "openai~=1.61.0",
+    "ollama~=0.4.8",
+    "qianfan~=0.3.18",
+    "retry~=0.9.2",
+    "tiktoken~=0.7.0",
+    "nltk~=3.9.1",
+    "gradio~=5.20.0",
+    "jieba~=0.42.1",
+    # numpy is also in ml, pinning to the version required by llm (>=1.24.4)
+    "numpy~=1.24.4",
+    "python-docx~=1.1.2",
+    "langchain-text-splitters~=0.2.2",
+    "faiss-cpu~=1.8.0",
+    "python-dotenv~=1.0.1",
+    "pyarrow~=17.0.0",
+    # pandas is also in ml, pinning to the version required by llm (<2.2.2)
+    "pandas~=2.2.3",
+    "openpyxl~=3.1.5",
+    "pydantic-settings~=2.6.1",
+    # decorator is also in python-client and vermeer
+    "decorator~=5.1.1",
+    # requests is also in python-client and vermeer
+    "requests~=2.32.0",
+    # setuptools is also in python-client and vermeer
+    "setuptools~=70.0.0",
+    # urllib3 is also in python-client and vermeer
+    "urllib3~=2.2.2",
+    # rich is also in python-client and vermeer
+    "rich~=13.9.4",
+    "apscheduler~=3.10.4",
+    "litellm~=1.61.13",
+]
+ml = [
+    "hugegraph-ml",
+    "dgl~=2.1.0",
+    "ogb~=1.3.6",
+    # pandas is also in llm, ensure version compatibility. llm: <2.2.2, ml: 
~2.2.3. This needs resolution.
+    # For now, let's use the stricter one from llm. If ml truly needs 2.2.3, 
this will be an issue.
+    "pandas~=2.2.3",

Review Comment:
   The comment indicates a version conflict between pandas requirements (llm: 
<2.2.2 vs ml: ~2.2.3) but the resolution is unclear. This dependency conflict 
should be properly resolved or the comment should specify the chosen resolution 
strategy.
   ```suggestion
       # pandas is also in llm, aligning to the stricter requirement from llm 
(<2.2.2) to avoid conflicts.
       # If ml truly needs 2.2.3 in the future, this will require revisiting 
and potentially splitting environments.
       "pandas<2.2.2",
   ```



##########
hugegraph-llm/README.md:
##########
@@ -16,97 +16,90 @@ For detailed source code doc, visit our 
[DeepWiki](https://deepwiki.com/apache/i
 ## 📋 Prerequisites
 
 > [!IMPORTANT]
-> - **Python**: 3.10+ (not tested on 3.12)
-> - **HugeGraph Server**: 1.3+ (recommended: 1.5+)
-> - **UV Package Manager**: 0.7+
-
-## 🚀 Quick Start
-
-Choose your preferred deployment method:
-
-### Option 1: Docker Compose (Recommended)
-
-The fastest way to get started with both HugeGraph Server and RAG Service:
-
-```bash
-# 1. Set up environment
-cp docker/env.template docker/.env
-# Edit docker/.env and set PROJECT_PATH to your actual project path
-
-# 2. Deploy services
-cd docker
-docker-compose -f docker-compose-network.yml up -d
-
-# 3. Verify deployment
-docker-compose -f docker-compose-network.yml ps
-
-# 4. Access services
-# HugeGraph Server: http://localhost:8080
-# RAG Service: http://localhost:8001
-```
-
-### Option 2: Individual Docker Containers
-
-For more control over individual components:
-
-#### Available Images
-- **`hugegraph/rag`** - Development image with source code access
-- **`hugegraph/rag-bin`** - Production-optimized binary (compiled with Nuitka)
-
-```bash
-# 1. Create network
-docker network create -d bridge hugegraph-net
-
-# 2. Start HugeGraph Server
-docker run -itd --name=server -p 8080:8080 --network hugegraph-net 
hugegraph/hugegraph
-
-# 3. Start RAG Service
-docker pull hugegraph/rag:latest
-docker run -itd --name rag \
-  -v /path/to/your/hugegraph-llm/.env:/home/work/hugegraph-llm/.env \
-  -p 8001:8001 --network hugegraph-net hugegraph/rag
-
-# 4. Monitor logs
-docker logs -f rag
-```
-
-### Option 3: Build from Source
-
-For development and customization:
-
-```bash
-# 1. Start HugeGraph Server
-docker run -itd --name=server -p 8080:8080 hugegraph/hugegraph
-
-# 2. Install UV package manager
-curl -LsSf https://astral.sh/uv/install.sh | sh
-
-# 3. Clone and setup project
-git clone https://github.com/apache/incubator-hugegraph-ai.git
-cd incubator-hugegraph-ai/hugegraph-llm
-
-# 4. Create virtual environment and install dependencies
-uv venv && source .venv/bin/activate
-uv pip install -e .
-
-# 5. Launch RAG demo
-python -m hugegraph_llm.demo.rag_demo.app
-# Access at: http://127.0.0.1:8001
-
-# 6. (Optional) Custom host/port
-python -m hugegraph_llm.demo.rag_demo.app --host 127.0.0.1 --port 18001
-```
-
-#### Additional Setup (Optional)
-
-```bash
-# Download NLTK stopwords for better text processing
-python ./hugegraph_llm/operators/common_op/nltk_helper.py
-
-# Update configuration files
-python -m hugegraph_llm.config.generate --update
-```
-
+> - python 3.10+ (not tested in 3.12)
+> - hugegraph-server 1.3+ (better to use 1.5+)
+> - uv 0.7+
+
+## 3. Deployment Options
+
+You can choose one of the following two deployment methods:
+
+### 3.1 Docker Deployment
+
+**Docker Deployment**  
+   Deploy HugeGraph-AI using Docker for quick setup:
+   - Ensure Docker is installed
+   - We provide two container images to choose from:
+     - **Image 1**: 
[hugegraph/rag](https://hub.docker.com/r/hugegraph/rag/tags)  
+       For building and running RAG functionality for rapid deployment and 
direct source code modification
+     - **Image 2**: 
[hugegraph/rag-bin](https://hub.docker.com/r/hugegraph/rag-bin/tags)  
+       A binary translation of C compiled with Nuitka, for better performance 
and efficiency.
+   - Pull one of the Docker images:
+     ```bash
+     docker pull hugegraph/rag:latest     # Pull Image 1
+     docker pull hugegraph/rag-bin:latest # Pull Image 2
+     ```
+   - Start one of the Docker containers:
+     ```bash
+     # Replace '/path/to/.env' with your actual .env file path
+     docker run -itd --name rag -v /path/to/.env:/home/work/hugegraph-llm/.env 
-p 8001:8001 hugegraph/rag
+     # or
+     docker run -itd --name rag-bin -v 
/path/to/.env:/home/work/hugegraph-llm/.env -p 8001:8001 hugegraph/rag-bin
+     ```
+   - Access the interface at http://localhost:8001
+
+### 3.2 Build from Source
+
+1. Start the HugeGraph database, you can run it via 
[Docker](https://hub.docker.com/r/hugegraph/hugegraph)/[Binary 
Package](https://hugegraph.apache.org/docs/download/download/)
+    There is a simple method by docker:  
+    ```bash
+   docker run -itd --name=server -p 8080:8080 hugegraph/hugegraph
+    ```  
+   You can refer to the detailed documents 
[doc](/docs/quickstart/hugegraph/hugegraph-server/#31-use-docker-container-convenient-for-testdev)
 for more guidance.
+
+2. Configure the uv environment by using the official installer to install uv. 
See the [uv documentation](https://docs.astral.sh/uv/configuration/installer/) 
for other installation methods
+    ```bash
+    # You could try pipx or pip to install uv when meet network issues, refer 
the uv doc for more details
+    curl -LsSf https://astral.sh/uv/install.sh | sh  - # install the latest 
version like 0.7.3+

Review Comment:
   There's a syntax error in the shell command with an extra hyphen and space 
before the comment. It should be: `curl -LsSf https://astral.sh/uv/install.sh | 
sh # install the latest version like 0.7.3+`
   ```suggestion
       curl -LsSf https://astral.sh/uv/install.sh | sh # install the latest 
version like 0.7.3+
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to