fix(llm): avoid generating config twice#56
Conversation
| if __name__ == '__main__': | ||
| parser = argparse.ArgumentParser(description='Generate hugegraph-llm config file') | ||
| settings.generate_env() | ||
| parser.add_argument("-U", "--update", action="store_true", help="Update the config file") |
There was a problem hiding this comment.
maybe -u is more user-friendly? (if no conflicts found)
Also a little confused, update. Why do .env files need to be scripted separately? Isn't the (configs)change application checked by default? @ChenZiHong-Gavin
There was a problem hiding this comment.
Personally, I think that separation helps to better prompt users to check or modify their configurations. But update is more like an overwrite operation. Would it be better to change to -o and --overwrite?
There was a problem hiding this comment.
maybe
-uis more user-friendly? (if no conflicts found)Also a little confused, update. Why do
.envfiles need to be scripted separately? Isn't the (configs)change application checked by default? @ChenZiHong-Gavin
Yes, every time Config is initialized, it automatically checks and generates the .env file. This script is a rewrite of the original script that generated the JSON file, and if we don't think it's necessary, it can actually be deleted.


Add an update option to let users choose to fix this.