Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 通过cli.py调用api时直接报错langchain-ChatGLM: error: unrecognized arguments: start cli #601

Closed
hzg0601 opened this issue Jun 12, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@hzg0601
Copy link
Collaborator

hzg0601 commented Jun 12, 2023

通过python cli.py start cli启动cli_demo时,报错:
langchain-ChatGLM: error: unrecognized arguments: start cli

类似地
通过python cli.py start webui启动webui时,报错:
langchain-ChatGLM: error: unrecognized arguments: start webui

@hzg0601 hzg0601 added the bug Something isn't working label Jun 12, 2023
@hzg0601
Copy link
Collaborator Author

hzg0601 commented Jun 12, 2023

# 通过cli.py调用cli_demo时需要在cli.py里初始化模型,否则会报错:

# langchain-ChatGLM: error: unrecognized arguments: start cli
# 为此需要先将
# args = None
# args = parser.parse_args()
# args_dict = vars(args)
# shared.loaderCheckPoint = LoaderCheckPoint(args_dict)
# 语句从cli_demo.py的main函数里取出放到函数外部
# 然后在cli.py里初始化

@hzg0601 hzg0601 closed this as completed Jun 12, 2023
glide-the added a commit that referenced this issue Jun 12, 2023
修复[bug] #598 #601,解决通过cli.py启动api、cli失败的问题
修改cli_demo启动顺序的问题
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant