Commit Graph

25 Commits

Author SHA1 Message Date
glide-the 35f2c04535 启动进程放入 try catch 保证任务收到SIGINT后,能够正常退出 2023-09-04 23:03:56 +08:00
glide-the aa4a5ad224 CTRL-C exit with Python multiprocessing 2023-09-04 22:46:46 +08:00
glide-the 3de9b2649c 协程兼容python版本 2023-09-02 19:29:24 +08:00
glide-the d7c884e34a 注册器未启动时,整个启动链因为异常被终止
使用await asyncio.sleep(3)可以让后续代码等待一段时间,但不是最优解
2023-09-02 19:20:41 +08:00
glide-the 3a660d4f74 TODO 2023-09-02 01:10:04 +08:00
liunux4odoo 6cb1bdf623
添加切换模型功能,支持智谱AI在线模型 (#1342)
* 添加LLM模型切换功能,需要在server_config中设置可切换的模型
* add tests for api.py/llm_model/*
* - 支持模型切换
- 支持智普AI线上模型
- startup.py增加参数`--api-worker`,自动运行所有的线上API模型。使用`-a
  (--all-webui), --all-api`时默认开启该选项
* 修复被fastchat覆盖的标准输出
* 对fastchat日志进行更细致的控制,startup.py中增加-q(--quiet)开关,可以减少无用的fastchat日志输出
* 修正chatglm api的对话模板


Co-authored-by: liunux4odoo <liunu@qq.com>
2023-09-01 23:58:09 +08:00
liunux4odoo 72b9da2649
startup.py增加参数-q | quiet,可以过滤fastchat的controller/model_worker不必要的日志输出 (#1333)
* startup.py增加参数`-q | quiet`,可以过滤fastchat的controller/model_worker不必要的日志输出
2023-08-31 22:55:07 +08:00
liunux4odoo b1201a5f23
优化LLM和Embedding模型运行设备配置,可设为auto自动检测;修复:重建知识库时FAISS未保存 (#1330)
* 避免configs对torch的依赖;
* webui自动从configs获取api地址(close #1319)
* bug fix: 重建知识库时FAISS未保存
* 优化LLM和Embedding模型运行设备配置,可设为auto自动检测
2023-08-31 17:44:48 +08:00
liunux4odoo 34a416b941
优化server_config配置项 (#1293)
* update server_config.py:
- 在model_config中增加HISTORY_LEN配置参数
- 将server_config中helper function移动到server.utils中
- 统一set_httpx_timeout的定义和调用

* update webui.py:
应用model_config中的配置项:HISTORY_LEN,VECTOR_SEARCH_TOP_K,SEARCH_ENGINE_TOP_K

---------

Co-authored-by: liunux4odoo <liunu@qq.com>
2023-08-29 10:06:09 +08:00
liunux4odoo ca0ae29fef
运行startup.py时,如果不加参数直接显示配置和帮助信息后退出 (#1284)
* 统一XX_kb_service.add_doc/do_add_doc接口,不再需要embeddings参数

* 运行startup.py时,如果不加参数直接显示配置和帮助信息后退出

---------

Co-authored-by: liunux4odoo <liunu@qq.com>
2023-08-28 16:03:53 +08:00
liunux4odoo 6ef8844b2b
修复使用chatgpt等在线API服务时模型加载错误 (#1271)
* close #1172: 给webui_page/utils添加一些log信息,方便定位错误

* 修复:重建知识库时页面未实时显示进度

* skip model_worker running when using online model api such as chatgpt

---------

Co-authored-by: liunux4odoo <liunu@qq.com>
2023-08-27 16:46:59 +08:00
liunux4odoo 447b370416 在search_engine_chat中检查Bing KEY,并更新tests 2023-08-25 10:58:40 +08:00
liunux4odoo 4899c3b3cc set max threads of numexpr to improve performance and ommit warnings 2023-08-24 11:04:30 +08:00
liunux4odoo c571585ffd optimize recreate vector store: save vector store once after all docs parsed for FAISS 2023-08-21 08:50:15 +08:00
imClumsyPanda adbee9f777 fix add_argument fault in startup.py 2023-08-20 17:30:39 +08:00
liunux4odoo 62d6f44b28 fix startup.py 2023-08-18 21:30:50 +08:00
liunux4odoo fe9f2df17d fix startup.py: correct command help info 2023-08-18 16:46:59 +08:00
liunux4odoo c3627de005 fix startup.py: add log info before server starting 2023-08-18 08:48:02 +08:00
imClumsyPanda 67839daad3 reformat and add version to startup.py 2023-08-17 22:22:28 +08:00
liunux4odoo 4278d1e000 fix startup.py 2023-08-17 21:57:13 +08:00
liunux4odoo d4c6a23a8d log server informations after startup 2023-08-17 20:02:28 +08:00
hzg0601 44d4bacf1c update llm_api_launch,api_allinone,webui_allinone,readme:1.llm_api_launch,api_allinone_webui_allinone更名;2. 更新readme关于startup的说明 2023-08-17 16:59:16 +08:00
liunux4odoo 6c9e3ddc21 make webui started at last 2023-08-17 14:22:19 +08:00
liunux4odoo 7dfc337bfa add controller parameter. used to run model-worker 2023-08-17 14:11:21 +08:00
liunux4odoo f92b002342 add startup.py: start specified servers with one command. see python startup.py --help 2023-08-17 13:24:53 +08:00