imbajin commented on code in PR #64:
URL: 
https://github.com/apache/incubator-hugegraph-ai/pull/64#discussion_r1718296958


##########
hugegraph-llm/src/hugegraph_llm/config/config.py:
##########
@@ -67,7 +67,7 @@ class Config:
     """HugeGraph settings"""
     graph_ip: Optional[str] = "127.0.0.1"
     graph_port: Optional[int] = 8080
-    # graph_space: Optional[str] = "DEFAULT"
+    graph_space: Optional[str] = "DEFAULT"

Review Comment:
   ```suggestion
       graph_space: Optional[str] = None
   ```



##########
hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py:
##########
@@ -302,27 +366,15 @@ def embedding_settings(embedding_type):
                     ]
             else:
                 embedding_config_input = []
+
             embedding_config_button = gr.Button("apply configuration")
+            
+            # 在这里调用独立的 apply_embedding_configuration 函数

Review Comment:
   EN comment



##########
hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py:
##########
@@ -433,6 +486,78 @@ def apply_embedding_configuration(arg1, arg2, arg3):
             out = gr.Textbox(label="Output", show_copy_button=True)
         btn = gr.Button("(BETA) Init HugeGraph test data (🚧WIP)")
         btn.click(fn=init_hg_test_data, inputs=inp, outputs=out)  # pylint: 
disable=no-member
+    return hugegraph_llm
+
+
+def rag_web_http_api():
+    @app.post("/rag")
+    def graph_rag_api(req: RAGRequest):
+        result = graph_rag(req.query, req.raw_llm, req.vector_only, 
req.graph_only, req.graph_vector)
+        return {key: value for key, value in zip(
+            ["raw_llm", "vector_only", "graph_only", "graph_vector"], result) 
if getattr(req, key)}

Review Comment:
   TODO: separate to another api pkg



-- 
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