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


##########
hugegraph-llm/src/hugegraph_llm/config/hugegraph_config.py:
##########
@@ -22,8 +22,7 @@
 class HugeGraphConfig(BaseConfig):
     """HugeGraph settings"""
     # graph server config
-    graph_ip: Optional[str] = "127.0.0.1"
-    graph_port: Optional[str] = "8080"
+    graph_url: Optional[str] = "http://127.0.0.1:8080";

Review Comment:
   ```suggestion
       graph_url: Optional[str] = "127.0.0.1:8080"
   ```
   
   use non-prefix default value (we already added the info for it)



##########
hugegraph-llm/src/hugegraph_llm/demo/rag_demo/configs_block.py:
##########
@@ -178,18 +178,22 @@ def apply_reranker_config(
     return status_code
 
 
-def apply_graph_config(ip, port, name, user, pwd, gs, origin_call=None) -> int:
-    huge_settings.graph_ip = ip
-    huge_settings.graph_port = port
+def apply_graph_config(url, name, user, pwd, gs, origin_call=None) -> int:
+    # Add URL prefix automatically to improve user experience
+    if url and not (url.startswith('http://') or url.startswith('https://')):
+        url = f"http://{url}";
+        log.info("Added 'http://' prefix to URL: %s", url)

Review Comment:
   ```suggestion
   ```



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