This is an automated email from the ASF dual-hosted git repository.
jin pushed a commit to branch graphspace
in repository https://gitbox.apache.org/repos/asf/incubator-hugegraph-ai.git
The following commit(s) were added to refs/heads/graphspace by this push:
new 336407a fix: handle CN decode problem & protect passwd
336407a is described below
commit 336407a6427b59e8074404fb1fb576c25efde61e
Author: imbajin <[email protected]>
AuthorDate: Wed Aug 14 05:06:27 2024 +0800
fix: handle CN decode problem & protect passwd
---
hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py | 2 +-
hugegraph-python-client/src/pyhugegraph/utils/util.py | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py
b/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py
index e349a3e..59edeb1 100644
--- a/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py
+++ b/hugegraph-llm/src/hugegraph_llm/demo/rag_web_demo.py
@@ -170,7 +170,7 @@ if __name__ == "__main__":
gr.Textbox(value=str(settings.graph_port), label="port"),
gr.Textbox(value=settings.graph_name, label="graph"),
gr.Textbox(value=settings.graph_user, label="user"),
- gr.Textbox(value=settings.graph_pwd, label="pwd"),
+ gr.Textbox(value=settings.graph_pwd, label="pwd",
type="password"),
gr.Textbox(value=settings.graph_space, label="graphspace
(None)"),
]
graph_config_button = gr.Button("apply configuration")
diff --git a/hugegraph-python-client/src/pyhugegraph/utils/util.py
b/hugegraph-python-client/src/pyhugegraph/utils/util.py
index 5ca36b3..26d4f43 100644
--- a/hugegraph-python-client/src/pyhugegraph/utils/util.py
+++ b/hugegraph-python-client/src/pyhugegraph/utils/util.py
@@ -55,8 +55,8 @@ def check_if_success(response, error=None):
# Log the detailed information
print(
f"\033[93mError-Client:\n"
- f"Request URL: {req.url}, Request Body: {req_body}\nResponse Body:
"
- f"{response_body}\033[0m"
+ f"Request URL: {req.url}, Request Body: {json.loads(req_body)}\n"
+ f"Response Body: {response_body}\033[0m"
)
raise error
return True