returnToInnocence commented on code in PR #90:
URL:
https://github.com/apache/incubator-hugegraph-ai/pull/90#discussion_r1795450857
##########
hugegraph-llm/src/hugegraph_llm/config/config.py:
##########
@@ -33,6 +33,16 @@
yaml_file_path = os.path.join(package_path,
f"src/hugegraph_llm/resources/demo/{F_NAME}")
+def read_dotenv() -> dict[str, Optional[str]]:
+ """Read a .env file in the given root path."""
+ env_config = dotenv_values(f"{env_path}")
+ log.info("Loading %s successfully!", env_path)
+ for key, value in env_config.items():
+ if key not in os.environ:
+ os.environ[key] = value or ""
+ return env_config
+
+
Review Comment:
The reason is that the function is in between two classes, which I
personally feel is a bit odd, so I put the function on top, so that the two
classes are next to each other
--
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]