You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hugegraph.apache.org by "simon824 (via GitHub)" <gi...@apache.org> on 2024/02/29 03:11:52 UTC

[PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

simon824 opened a new pull request, #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331

   (no comment)


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin merged PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "simon824 (via GitHub)" <gi...@apache.org>.
simon824 commented on code in PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#discussion_r1512505952


##########
content/cn/docs/quickstart/hugegraph-ai.md:
##########
@@ -0,0 +1,147 @@
+---
+title: "HugeGraph-Ai Quick Start (Beta)"
+linkTitle: "使用 HugeGraph-Ai (Beta)"
+weight: 4
+---
+
+### 1 HugeGraph-Ai 概述
+hugegraph-ai 旨在探索 HugeGraph 与人工智能(AI)的融合,包括与大模型结合的应用,与图机器学习组件的集成等,为开发者在项目中利用 HugeGraph 的 AI 能力提供全面支持。
+
+### 2 环境要求
+- python 3.8+
+- hugegraph 1.0.0+ 
+
+### 3 准备工作
+- 启动 HugeGraph 数据库,你可以通过 Docker 来实现。请参考这个[链接](https://hub.docker.com/r/hugegraph/hugegraph)获取指引。
+- 启动 gradio 交互式 demo,你可以通过以下命令启动,启动后打开 [http://127.0.0.1:8001](http://127.0.0.1:8001)
+```bash
+# ${PROJECT_ROOT_DIR} 为 hugegraph-ai 的根目录,需要自行配置
+export PYTHONPATH=${PROJECT_ROOT_DIR}/hugegraph-llm/src:${PROJECT_ROOT_DIR}/hugegraph-python-client/src
+python3 ./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py
+```
+- 配置 HugeGraph 数据库连接信息和 LLM 模型信息,可以通过两种方式配置:
+  1. 配置 `./hugegraph-llm/src/config/config.ini` 文件
+  2. 在 gradio 中配置,如图所示:
+  ![gradio配置](/docs/images/gradio-config.png)
+- 离线下载 NLTK stopwords 
+```bash
+python3 ./hugegraph_llm/operators/common_op/nltk_helper.py

Review Comment:
   @liuxiaocs7 We can download stopwords offline by running the command below
   ```python
   python3 ./hugegraph_llm/operators/common_op/nltk_helper.py
   ```



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "simon824 (via GitHub)" <gi...@apache.org>.
simon824 commented on PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#issuecomment-1979972902

   > after clean data and then re-init graph got the result.
   > 
   > ```
   > curl -v -X DELETE 192.168.110.215:8080/graphs/hugegraph/clear?confirm_message=I%27m+sure+to+delete+all+data
   > ```
   
   Added `clear_graph_all_data()` in https://github.com/apache/incubator-hugegraph-ai/pull/30/commits/c5a5a47bbbf8e10fcc04b4404d05fbfbd12e5227 


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "simon824 (via GitHub)" <gi...@apache.org>.
simon824 commented on PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#issuecomment-1975943372

   > > Did you try again several times? It might be a network issue.
   > 
   > Yes, I have executed it manually many times and the result is like this, log:
   > 
   > ```
   >   File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/nltk/data.py", line 583, in find
   >     raise LookupError(resource_not_found)
   > LookupError: 
   > **********************************************************************
   >   Resource stopwords not found.
   >   Please use the NLTK Downloader to obtain the resource:
   > 
   >   >>> import nltk
   >   >>> nltk.download('stopwords')
   >   
   >   For more information see: https://www.nltk.org/data.html
   > 
   >   Attempted to load corpora/stopwords
   > 
   >   Searched in:
   >     - '/home/root1/nltk_data'
   >     - '/home/root1/software/miniconda3/envs/hg-ai/nltk_data'
   >     - '/home/root1/software/miniconda3/envs/hg-ai/share/nltk_data'
   >     - '/home/root1/software/miniconda3/envs/hg-ai/lib/nltk_data'
   >     - '/usr/share/nltk_data'
   >     - '/usr/local/share/nltk_data'
   >     - '/usr/lib/nltk_data'
   >     - '/usr/local/lib/nltk_data'
   >     - '/tmp/hugegraph_llm'
   > **********************************************************************
   > ```
   > 
   > Do we need to add instructions for offline downloading in the document?
   
   This exception was thrown from which line of code?  I executed `LTKHelper().stopwords()`  and the `stopwords.zip` file was downloaded successfully.


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#issuecomment-1978665842

   Hi, @imbajin, any suggestions?


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#issuecomment-1978625502

   Using the proxy in the command line can download normally, but encountered new problems when executing RAG.
   
   1. First init HG
   
   ![image](https://github.com/apache/incubator-hugegraph-doc/assets/42756849/49b7e8b2-7aa1-4990-bec6-a4bd508b4b6f)
   
   2. RAG
   
   ![image](https://github.com/apache/incubator-hugegraph-doc/assets/42756849/b100704c-051a-4668-b94c-9e92087a1e8d)
   
   
   ```bash
   INFO:     192.168.110.32:11406 - "POST /queue/join HTTP/1.1" 200 OK
   INFO:     192.168.110.32:11406 - "GET /queue/data?session_hash=804xxsr8w7f HTTP/1.1" 200 OK
   KEYWORDS: ['Al Pacino', 'tell me about', 'Hollywood', 'film', 'Al', 'Pacino', 'tell', 'actor']
   Traceback (most recent call last):
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/gradio/queueing.py", line 495, in call_prediction
       output = await route_utils.call_process_api(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/gradio/route_utils.py", line 235, in call_process_api
       output = await app.get_blocks().process_api(
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/gradio/blocks.py", line 1627, in process_api
       result = await self.call_function(
                ^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/gradio/blocks.py", line 1173, in call_function
       prediction = await anyio.to_thread.run_sync(
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
       return await get_async_backend().run_sync_in_worker_thread(
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2144, in run_sync_in_worker_thread
       return await future
              ^^^^^^^^^^^^
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 851, in run
       result = context.run(func, *args)
                ^^^^^^^^^^^^^^^^^^^^^^^^
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/gradio/utils.py", line 690, in wrapper
       response = f(*args, **kwargs)
                  ^^^^^^^^^^^^^^^^^^
     File "/home/root1/lx/incubator-hugegraph-ai/./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py", line 83, in graph_rag
       .run(verbose=True)
        ^^^^^^^^^^^^^^^^^
     File "/home/root1/lx/incubator-hugegraph-ai/hugegraph-llm/src/hugegraph_llm/operators/graph_rag_task.py", line 90, in run
       context = op.run(context)
                 ^^^^^^^^^^^^^^^
     File "/home/root1/lx/incubator-hugegraph-ai/hugegraph-llm/src/hugegraph_llm/operators/hugegraph_op/graph_rag_query.py", line 130, in run
       raise RuntimeError("Unsupported ID format for Graph RAG.")
   RuntimeError: Unsupported ID format for Graph RAG.
   
   ```
   


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on code in PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#discussion_r1508998586


##########
content/cn/docs/quickstart/hugegraph-ai.md:
##########
@@ -0,0 +1,143 @@
+---
+title: "HugeGraph-Ai Quick Start (Beta)"
+linkTitle: "使用 HugeGraph-Ai (Beta)"
+weight: 4
+---
+
+### 1 HugeGraph-Ai 概述
+hugegraph-ai 旨在探索 HugeGraph 与人工智能(AI)的融合,包括与大模型结合的应用,与图机器学习组件的集成等,为开发者在项目中利用 HugeGraph 的 AI 能力提供全面支持。
+
+### 2 环境要求
+- python 3.8+
+- hugegraph 1.0.0+ 
+
+### 3 准备工作
+- 启动 HugeGraph 数据库,你可以通过 Docker 来实现。请参考这个[链接](https://hub.docker.com/r/hugegraph/hugegraph)获取指引。
+- 启动 gradio 交互式 demo,你可以通过以下命令启动,启动后打开 [http://127.0.0.1:8001](http://127.0.0.1:8001)
+```bash
+# ${PROJECT_ROOT_DIR} 为 hugegraph-ai 的根目录,需要自行配置
+export PYTHONPATH=${PROJECT_ROOT_DIR}/hugegraph-llm/src:${PROJECT_ROOT_DIR}/hugegraph-python-client/src
+python3 ./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py
+```
+- 配置 HugeGraph 数据库连接信息和 LLM 模型信息,可以通过两种方式配置:
+  1. 配置 `./hugegraph-llm/src/config/config.ini` 文件
+  2. 在 gradio 中配置,如图所示:
+  ![gradio配置](/docs/images/gradio-config.png)
+
+
+### 4 使用说明
+#### 4.1 通过 LLM 在 HugeGraph 中构建知识图谱
+##### 4.1.1 通过 gradio 交互式界面构建知识图谱
+- 参数说明:
+  - Text: 输入的文本。 
+  - Schema:接受以下两种类型的文本: 
+    - 用户定义的 JSON 格式模式。 
+    - 指定 HugeGraph 图实例的名称,它将自动提取图的模式。
+  - Disambiguate word sense:是否进行词义消除歧义。 
+  - Commit to hugegraph:是否将构建的知识图提交到 HugeGraph 服务器
+
+![gradio配置](/docs/images/gradio-kg.png)
+
+##### 4.1.2 通过代码构建知识图谱
+- 完整代码
+```python
+from hugegraph_llm.llms.init_llm import LLMs
+from hugegraph_llm.operators.kg_construction_task import KgBuilder
+
+llm = LLMs().get_llm()
+builder = KgBuilder(llm)
+(
+    builder
+    .import_schema(from_hugegraph="test_graph").print_result()
+    .extract_triples(TEXT).print_result()
+    .disambiguate_word_sense().print_result()
+    .commit_to_hugegraph()
+    .run()
+)
+```
+- 时序图
+![gradio配置](/docs/images/kg-uml.png)
+
+
+1. 初始化: 初始化 LLMs 实例,获取 LLM 模型,然后创建图谱构建的任务实例 `KgBuilder`,KgBuilder 中定义了多个 operator ,用户可以根据需求自由组合达到目的 。(tip: `print_result()` 可以在控制台打印每一步输出的结果,不影响整体执行逻辑)

Review Comment:
   ```suggestion
   1. 初始化: 初始化 LLMs 实例,获取 LLM,然后创建图谱构建的任务实例 `KgBuilder`,KgBuilder 中定义了多个 operator,用户可以根据需求自由组合达到目的 。(tip: `print_result()` 可以在控制台打印每一步输出的结果,不影响整体执行逻辑)
   ```



##########
content/cn/docs/quickstart/hugegraph-ai.md:
##########
@@ -0,0 +1,143 @@
+---
+title: "HugeGraph-Ai Quick Start (Beta)"
+linkTitle: "使用 HugeGraph-Ai (Beta)"
+weight: 4
+---
+
+### 1 HugeGraph-Ai 概述
+hugegraph-ai 旨在探索 HugeGraph 与人工智能(AI)的融合,包括与大模型结合的应用,与图机器学习组件的集成等,为开发者在项目中利用 HugeGraph 的 AI 能力提供全面支持。
+
+### 2 环境要求
+- python 3.8+
+- hugegraph 1.0.0+ 
+
+### 3 准备工作
+- 启动 HugeGraph 数据库,你可以通过 Docker 来实现。请参考这个[链接](https://hub.docker.com/r/hugegraph/hugegraph)获取指引。
+- 启动 gradio 交互式 demo,你可以通过以下命令启动,启动后打开 [http://127.0.0.1:8001](http://127.0.0.1:8001)
+```bash
+# ${PROJECT_ROOT_DIR} 为 hugegraph-ai 的根目录,需要自行配置
+export PYTHONPATH=${PROJECT_ROOT_DIR}/hugegraph-llm/src:${PROJECT_ROOT_DIR}/hugegraph-python-client/src
+python3 ./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py
+```
+- 配置 HugeGraph 数据库连接信息和 LLM 模型信息,可以通过两种方式配置:
+  1. 配置 `./hugegraph-llm/src/config/config.ini` 文件
+  2. 在 gradio 中配置,如图所示:
+  ![gradio配置](/docs/images/gradio-config.png)
+
+
+### 4 使用说明
+#### 4.1 通过 LLM 在 HugeGraph 中构建知识图谱
+##### 4.1.1 通过 gradio 交互式界面构建知识图谱
+- 参数说明:
+  - Text: 输入的文本。 
+  - Schema:接受以下两种类型的文本: 
+    - 用户定义的 JSON 格式模式。 
+    - 指定 HugeGraph 图实例的名称,它将自动提取图的模式。
+  - Disambiguate word sense:是否进行词义消除歧义。 
+  - Commit to hugegraph:是否将构建的知识图提交到 HugeGraph 服务器

Review Comment:
   ```suggestion
     - Commit to hugegraph:是否将构建的知识图谱提交到 HugeGraph 服务器
   ```



##########
content/cn/docs/quickstart/hugegraph-ai.md:
##########
@@ -0,0 +1,143 @@
+---
+title: "HugeGraph-Ai Quick Start (Beta)"
+linkTitle: "使用 HugeGraph-Ai (Beta)"
+weight: 4
+---
+
+### 1 HugeGraph-Ai 概述
+hugegraph-ai 旨在探索 HugeGraph 与人工智能(AI)的融合,包括与大模型结合的应用,与图机器学习组件的集成等,为开发者在项目中利用 HugeGraph 的 AI 能力提供全面支持。
+
+### 2 环境要求
+- python 3.8+
+- hugegraph 1.0.0+ 
+
+### 3 准备工作
+- 启动 HugeGraph 数据库,你可以通过 Docker 来实现。请参考这个[链接](https://hub.docker.com/r/hugegraph/hugegraph)获取指引。
+- 启动 gradio 交互式 demo,你可以通过以下命令启动,启动后打开 [http://127.0.0.1:8001](http://127.0.0.1:8001)
+```bash
+# ${PROJECT_ROOT_DIR} 为 hugegraph-ai 的根目录,需要自行配置
+export PYTHONPATH=${PROJECT_ROOT_DIR}/hugegraph-llm/src:${PROJECT_ROOT_DIR}/hugegraph-python-client/src
+python3 ./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py
+```
+- 配置 HugeGraph 数据库连接信息和 LLM 模型信息,可以通过两种方式配置:
+  1. 配置 `./hugegraph-llm/src/config/config.ini` 文件
+  2. 在 gradio 中配置,如图所示:
+  ![gradio配置](/docs/images/gradio-config.png)
+
+
+### 4 使用说明
+#### 4.1 通过 LLM 在 HugeGraph 中构建知识图谱
+##### 4.1.1 通过 gradio 交互式界面构建知识图谱
+- 参数说明:
+  - Text: 输入的文本。 
+  - Schema:接受以下两种类型的文本: 
+    - 用户定义的 JSON 格式模式。 
+    - 指定 HugeGraph 图实例的名称,它将自动提取图的模式。
+  - Disambiguate word sense:是否进行词义消除歧义。 
+  - Commit to hugegraph:是否将构建的知识图提交到 HugeGraph 服务器
+
+![gradio配置](/docs/images/gradio-kg.png)
+
+##### 4.1.2 通过代码构建知识图谱
+- 完整代码
+```python
+from hugegraph_llm.llms.init_llm import LLMs
+from hugegraph_llm.operators.kg_construction_task import KgBuilder
+
+llm = LLMs().get_llm()
+builder = KgBuilder(llm)
+(
+    builder
+    .import_schema(from_hugegraph="test_graph").print_result()
+    .extract_triples(TEXT).print_result()
+    .disambiguate_word_sense().print_result()
+    .commit_to_hugegraph()
+    .run()
+)
+```
+- 时序图
+![gradio配置](/docs/images/kg-uml.png)
+
+
+1. 初始化: 初始化 LLMs 实例,获取 LLM 模型,然后创建图谱构建的任务实例 `KgBuilder`,KgBuilder 中定义了多个 operator ,用户可以根据需求自由组合达到目的 。(tip: `print_result()` 可以在控制台打印每一步输出的结果,不影响整体执行逻辑)
+
+```python
+llm = LLMs().get_llm()
+builder = KgBuilder(llm)
+```
+2. 导入 Schema:使用 `import_schema` 方法导入, 支持三种模式:
+    - 从 HugeGraph 实例导入,指定 HugeGraph 图实例的名称,它将自动提取图的模式。
+    - 从用户定义的模式导入,接受用户定义的 JSON 格式模式。
+    - 从提取结果导入(即将发布)
+```python
+# Import schema from a HugeGraph instance
+builder.import_schema(from_hugegraph="test_graph").print_result()
+# Import schema from an extraction result
+builder.import_schema(from_extraction="xxx").print_result()
+# Import schema from user-defined schema
+builder.import_schema(from_user_defined="xxx").print_result()
+```

Review Comment:
   Is it better to keep the description and code in the same order?



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "simon824 (via GitHub)" <gi...@apache.org>.
simon824 commented on PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#issuecomment-1975487344

   > when exec rag, seems download nltk stopwords fails:
   > 
   > ![image](https://private-user-images.githubusercontent.com/42756849/309273041-9161da6e-faf9-49b0-bc33-dbe7aacde6a6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk1MTQ3OTcsIm5iZiI6MTcwOTUxNDQ5NywicGF0aCI6Ii80Mjc1Njg0OS8zMDkyNzMwNDEtOTE2MWRhNmUtZmFmOS00OWIwLWJjMzMtZGJlN2FhY2RlNmE2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzA0VDAxMDgxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWZiZDEzMWU0NTQ4OTM5NDFhMjYwOTNlYjhmMjVhYTIxZDViNzRjZTUyOTdlNzcyOTM5MWQ0MWM3NTNkNDEwYTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.trgsJOEfKjPR0CWnRSaDlQYJKE7Q2VsDQ_X7eUDQGuk)
   > 
   > ![image](https://private-user-images.githubusercontent.com/42756849/309272925-8f2754e1-812d-4f70-8526-b5aa89539e54.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MDk1MTQ3OTcsIm5iZiI6MTcwOTUxNDQ5NywicGF0aCI6Ii80Mjc1Njg0OS8zMDkyNzI5MjUtOGYyNzU0ZTEtODEyZC00ZjcwLTg1MjYtYjVhYTg5NTM5ZTU0LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDAzMDQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwMzA0VDAxMDgxN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTFmYjY3NGVkYzk2NjNhNGFkZjczNWJjNTE1NzNmZTEyMzFmMGI2YWY4OTA2ZmM4YmJiOTY5MTc0YjI0YTU2N2ImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.HcJxTl6YyBjH-BSLdDdKOHdtxrrFAtNdVL95cJPR4Fk)
   
   Did you try again several times? It might be a network issue.


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "vichayturen (via GitHub)" <gi...@apache.org>.
vichayturen commented on PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#issuecomment-1978284743

   > > Did you try again several times? It might be a network issue.
   > 
   > Yes, I have executed it manually many times and the result is like this, log:
   > 
   > ```
   >   File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/nltk/data.py", line 583, in find
   >     raise LookupError(resource_not_found)
   > LookupError: 
   > **********************************************************************
   >   Resource stopwords not found.
   >   Please use the NLTK Downloader to obtain the resource:
   > 
   >   >>> import nltk
   >   >>> nltk.download('stopwords')
   >   
   >   For more information see: https://www.nltk.org/data.html
   > 
   >   Attempted to load corpora/stopwords
   > 
   >   Searched in:
   >     - '/home/root1/nltk_data'
   >     - '/home/root1/software/miniconda3/envs/hg-ai/nltk_data'
   >     - '/home/root1/software/miniconda3/envs/hg-ai/share/nltk_data'
   >     - '/home/root1/software/miniconda3/envs/hg-ai/lib/nltk_data'
   >     - '/usr/share/nltk_data'
   >     - '/usr/local/share/nltk_data'
   >     - '/usr/lib/nltk_data'
   >     - '/usr/local/lib/nltk_data'
   >     - '/tmp/hugegraph_llm'
   > **********************************************************************
   > ```
   > 
   > Do we need to add instructions for offline downloading in the document?
   
   solutions:
   1. offline download and save into `nltk_data` dir
   2. set proxy
   ```python
   import os
   os.environ["http_proxy"] = f"http://127.0.0.1:{port}"
   os.environ["https_proxy"] = f"http://127.0.0.1:{port}"
   import nltk
   nltk.download('stopwords')
   ```


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on code in PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#discussion_r1512715833


##########
content/cn/docs/quickstart/hugegraph-ai.md:
##########
@@ -0,0 +1,147 @@
+---
+title: "HugeGraph-Ai Quick Start (Beta)"
+linkTitle: "使用 HugeGraph-Ai (Beta)"
+weight: 4
+---
+
+### 1 HugeGraph-Ai 概述
+hugegraph-ai 旨在探索 HugeGraph 与人工智能(AI)的融合,包括与大模型结合的应用,与图机器学习组件的集成等,为开发者在项目中利用 HugeGraph 的 AI 能力提供全面支持。
+
+### 2 环境要求
+- python 3.8+
+- hugegraph 1.0.0+ 
+
+### 3 准备工作
+- 启动 HugeGraph 数据库,你可以通过 Docker 来实现。请参考这个[链接](https://hub.docker.com/r/hugegraph/hugegraph)获取指引。
+- 启动 gradio 交互式 demo,你可以通过以下命令启动,启动后打开 [http://127.0.0.1:8001](http://127.0.0.1:8001)
+```bash
+# ${PROJECT_ROOT_DIR} 为 hugegraph-ai 的根目录,需要自行配置
+export PYTHONPATH=${PROJECT_ROOT_DIR}/hugegraph-llm/src:${PROJECT_ROOT_DIR}/hugegraph-python-client/src
+python3 ./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py
+```
+- 配置 HugeGraph 数据库连接信息和 LLM 模型信息,可以通过两种方式配置:
+  1. 配置 `./hugegraph-llm/src/config/config.ini` 文件
+  2. 在 gradio 中配置,如图所示:

Review Comment:
   prefer add `click button` here and see the output?



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "imbajin (via GitHub)" <gi...@apache.org>.
imbajin commented on code in PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#discussion_r1517078879


##########
README.md:
##########
@@ -50,6 +50,7 @@ The functions of this system include but are not limited to:
 - [HugeGraph-Computer](https://hugegraph.apache.org/docs/quickstart/hugegraph-computer): HugeGraph-Computer is a distributed graph processing system for HugeGraph (OLAP). It is an implementation of [Pregel](https://kowshik.github.io/JPregel/pregel_paper.pdf). It runs on Kubernetes framework;
 - [HugeGraph-Hubble](https://hugegraph.apache.org/docs/quickstart/hugegraph-hubble): HugeGraph-Hubble is HugeGraph's web visualization management platform, a one-stop visual analysis platform. The platform covers the whole process from data modeling, to rapid data import, to online and offline analysis of data, and unified management of graphs;
 - [HugeGraph-Tools](https://hugegraph.apache.org/docs/quickstart/hugegraph-tools): HugeGraph-Tools is HugeGraph's deployment and management tools, including functions such as managing graphs, backup/restore, Gremlin execution, etc.
+- [HugeGraph-Ai (Beta)](https://hugegraph.apache.org/docs/quickstart/hugegraph-ai): HugeGraph-Ai is a tool that integrates HugeGraph and artificial intelligence (AI), including applications combined with large models, integration with graph machine learning components, etc., to provide comprehensive support for developers to use HugeGraph's AI capabilities in projects.

Review Comment:
   could also add to other repo's README now? (for release 1.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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#issuecomment-1975593927

   
   > Did you try again several times? It might be a network issue.
   
   Yes, I have executed it manually many times and the result is like this, log:
   
   
   ```
     File "/home/root1/software/miniconda3/envs/hg-ai/lib/python3.11/site-packages/nltk/data.py", line 583, in find
       raise LookupError(resource_not_found)
   LookupError: 
   **********************************************************************
     Resource stopwords not found.
     Please use the NLTK Downloader to obtain the resource:
   
     >>> import nltk
     >>> nltk.download('stopwords')
     
     For more information see: https://www.nltk.org/data.html
   
     Attempted to load corpora/stopwords
   
     Searched in:
       - '/home/root1/nltk_data'
       - '/home/root1/software/miniconda3/envs/hg-ai/nltk_data'
       - '/home/root1/software/miniconda3/envs/hg-ai/share/nltk_data'
       - '/home/root1/software/miniconda3/envs/hg-ai/lib/nltk_data'
       - '/usr/share/nltk_data'
       - '/usr/local/share/nltk_data'
       - '/usr/lib/nltk_data'
       - '/usr/local/lib/nltk_data'
       - '/tmp/hugegraph_llm'
   **********************************************************************
   
   ```


-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org


Re: [PR] doc: add hugegraph-ai doc [incubator-hugegraph-doc]

Posted by "liuxiaocs7 (via GitHub)" <gi...@apache.org>.
liuxiaocs7 commented on code in PR #331:
URL: https://github.com/apache/incubator-hugegraph-doc/pull/331#discussion_r1512715833


##########
content/cn/docs/quickstart/hugegraph-ai.md:
##########
@@ -0,0 +1,147 @@
+---
+title: "HugeGraph-Ai Quick Start (Beta)"
+linkTitle: "使用 HugeGraph-Ai (Beta)"
+weight: 4
+---
+
+### 1 HugeGraph-Ai 概述
+hugegraph-ai 旨在探索 HugeGraph 与人工智能(AI)的融合,包括与大模型结合的应用,与图机器学习组件的集成等,为开发者在项目中利用 HugeGraph 的 AI 能力提供全面支持。
+
+### 2 环境要求
+- python 3.8+
+- hugegraph 1.0.0+ 
+
+### 3 准备工作
+- 启动 HugeGraph 数据库,你可以通过 Docker 来实现。请参考这个[链接](https://hub.docker.com/r/hugegraph/hugegraph)获取指引。
+- 启动 gradio 交互式 demo,你可以通过以下命令启动,启动后打开 [http://127.0.0.1:8001](http://127.0.0.1:8001)
+```bash
+# ${PROJECT_ROOT_DIR} 为 hugegraph-ai 的根目录,需要自行配置
+export PYTHONPATH=${PROJECT_ROOT_DIR}/hugegraph-llm/src:${PROJECT_ROOT_DIR}/hugegraph-python-client/src
+python3 ./hugegraph-llm/src/hugegraph_llm/utils/gradio_demo.py
+```
+- 配置 HugeGraph 数据库连接信息和 LLM 模型信息,可以通过两种方式配置:
+  1. 配置 `./hugegraph-llm/src/config/config.ini` 文件
+  2. 在 gradio 中配置,如图所示:

Review Comment:
   prefer add `click xxx button` when use gradio and see the output?



-- 
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: issues-unsubscribe@hugegraph.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@hugegraph.apache.org
For additional commands, e-mail: issues-help@hugegraph.apache.org