temp
This commit is contained in:
parent
4f7dc28f08
commit
a3ee718ab5
15
cli.py
15
cli.py
|
|
@ -1,6 +1,7 @@
|
||||||
import click
|
import click
|
||||||
|
|
||||||
from api import api_start as api_start
|
from api import api_start as api_start
|
||||||
|
from cli_demo import main as cli_start
|
||||||
from configs.model_config import llm_model_dict, embedding_model_dict
|
from configs.model_config import llm_model_dict, embedding_model_dict
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -54,13 +55,19 @@ def start_api(ip, port):
|
||||||
|
|
||||||
|
|
||||||
@start.command(name="cli", context_settings=dict(help_option_names=['-h', '--help']))
|
@start.command(name="cli", context_settings=dict(help_option_names=['-h', '--help']))
|
||||||
def start_cli():
|
@click.option('-i', '--info', default="start client", show_default=True, type=str)
|
||||||
import cli_demo
|
def start_cli(info):
|
||||||
cli_demo.main()
|
print(info)
|
||||||
|
|
||||||
|
from models.loader.args import parser
|
||||||
|
cli_start()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@start.command(name="webui", context_settings=dict(help_option_names=['-h', '--help']))
|
@start.command(name="webui", context_settings=dict(help_option_names=['-h', '--help']))
|
||||||
def start_webui():
|
@click.option('-i', '--info', default="start client", show_default=True, type=str)
|
||||||
|
def start_webui(info):
|
||||||
|
print(info)
|
||||||
import webui
|
import webui
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ def dir_path(string):
|
||||||
return s
|
return s
|
||||||
|
|
||||||
|
|
||||||
parser = argparse.ArgumentParser(prog='langchina-ChatGLM',
|
parser = argparse.ArgumentParser(prog='langchain-ChatGLM',
|
||||||
description='About langchain-ChatGLM, local knowledge based ChatGLM with langchain | '
|
description='About langchain-ChatGLM, local knowledge based ChatGLM with langchain | '
|
||||||
'基于本地知识库的 ChatGLM 问答')
|
'基于本地知识库的 ChatGLM 问答')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue