returnToInnocence commented on code in PR #375: URL: https://github.com/apache/incubator-hugegraph-doc/pull/375#discussion_r1824901204
########## content/cn/docs/quickstart/hugegraph-ai.md: ########## @@ -1,148 +1,177 @@ ---- title: "HugeGraph-AI Quick Start" linkTitle: "使用 HugeGraph-AI" weight: 4 ---- ### 1 HugeGraph-AI 概述 hugegraph-ai 旨在探索 HugeGraph 与人工智能(AI)的融合,包括与大模型结合的应用,与图机器学习组件的集成等,为开发者在项目中利用 HugeGraph 的 AI 能力提供全面支持。 ### 2 环境要求 -- python 3.8+ -- hugegraph 1.0.0+ +- python 3.9+ +- hugegraph-server 1.2+ ### 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 中,分别完成 LLM 和 HugeGraph 的配置后,点击 `Initialize configs`,将返回初始化后的完整配置文件。如图所示: -  -- 离线下载 NLTK stopwords -```bash -python3 ./hugegraph_llm/operators/common_op/nltk_helper.py -``` - - -### 4 使用说明 -#### 4.1 通过 LLM 在 HugeGraph 中构建知识图谱 -##### 4.1.1 通过 gradio 交互式界面构建知识图谱 -- 参数说明: - - Text: 输入的文本。 - - Schema:接受以下两种类型的文本: - - 用户定义的 JSON 格式模式。 - - 指定 HugeGraph 图实例的名称,它将自动提取图的模式。 - - Disambiguate word sense:是否进行词义消除歧义。 - - Commit to hugegraph:是否将构建的知识图谱提交到 HugeGraph 服务器 - - + +1. 启动HugeGraph数据库,可以通过[Docker](https://hub.docker.com/r/hugegraph/hugegraph) / [Binary Package](https://hugegraph.apache.org/docs/download/download/)运行它。 Review Comment: get -- 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]
