hzg0601
c1440c2609
增加ElasticSearch支持
2023-11-10 16:04:41 +08:00
liunux4odoo
b51ba11f45
支持通过配置项同时启动多个模型,将Wiki纳入samples知识库 ( #2002 )
...
新功能:
- 将 LLM_MODEL 配置项改为 LLM_MODELS 列表,同时启动多个模型
- 将 wiki 纳入 samples 知识库
依赖变化:
- 指定 streamlit~=1.27.0。1.26.0会报rerun错误,1.28.0会有无限刷新错误
修复优化:
- 优化 get_default_llm_model 逻辑
- 适配 Qwen 在线 API 做 Embeddings 时最大 25 行的限制
- 列出知识库磁盘文件时跳过 . 开头的文件
2023-11-09 22:15:52 +08:00
WilliamChen-luckbob
ce1001a043
bugfix:dev分支创建知识库必然失败的bug修复 ( #1980 )
...
* bugfix:dev分支创建知识库必然失败的bug修复
* 统一 KBServiceFactory.get_service_by_name 的逻辑,数据库中不存在知识库时返回 None
---------
Co-authored-by: liunux4odoo <liunux@qq.com>
2023-11-09 17:45:21 +08:00
liunux4odoo
d0d688d4b0
修复:重建知识库时自动创建库表
2023-11-07 21:00:45 +08:00
imClumsyPanda
ccf277c96f
delete outdated qrcode
2023-11-07 16:32:44 +08:00
imClumsyPanda
0e8700edb9
Merge branch 'master' into dev
2023-11-07 16:31:45 +08:00
imClumsyPanda
349adbdfa7
Add files via upload
2023-11-07 16:05:26 +08:00
imClumsyPanda
da1dbf9763
Update README.md
2023-11-07 16:05:03 +08:00
zR
3952fbd464
更新依赖和配置文件中的Agent模型 ( #1984 )
2023-11-07 13:52:47 +08:00
imClumsyPanda
e233e4f220
reformat server/knowledge_base/migrate.py
2023-11-06 22:49:35 +08:00
imClumsyPanda
fb32c31a70
reformat kb_doc_api.py
2023-11-06 22:44:50 +08:00
imClumsyPanda
fe73ceab15
Merge branch 'master' into dev
2023-11-06 22:38:52 +08:00
imClumsyPanda
051a2e97dc
add support for Zhipu-api "chatglm-turbo"
2023-11-06 22:38:05 +08:00
imClumsyPanda
f4f7845f93
reformat startup.py
2023-11-06 22:31:09 +08:00
imClumsyPanda
ce9160fbfa
update requirements.txt
2023-11-06 22:11:55 +08:00
imClumsyPanda
ed2122a8f6
fix bug in basic_config.py.example
2023-11-06 21:49:05 +08:00
imClumsyPanda
a938b67163
reformat config files
2023-11-05 11:17:09 +08:00
imClumsyPanda
5e0476925b
reformat copy_config_example.py
2023-11-05 11:08:55 +08:00
zR
57612d5232
修复一些bug ( #1965 )
...
* 修改一些bug
* 更新掉了一部分之前的bug
2023-11-03 18:56:27 +08:00
qiankunli
fa906b33a8
添加对话评分与历史消息保存功能 ( #1940 )
...
* 新功能:
- WEBUI 添加对话评分功能
- 增加 /chat/feedback 接口,用于接收对话评分
- /chat/chat 接口返回值由 str 改为 {"text":str, "chat_history_id": str}
- init_database.py 添加 --create-tables --clear-tables 参数
依赖:
- streamlit-chatbox==1.1.11
开发者:
- ChatHistoryModel 的 id 字段支持自动生成
- SAVE_CHAT_HISTORY 改到 basic_config.py
* 修复:点击反馈后页面未刷新
---------
Co-authored-by: liqiankun.1111 <liqiankun.1111@bytedance.com>
Co-authored-by: liunux4odoo <liunux@qq.com>
Co-authored-by: liunux4odoo <41217877+liunux4odoo@users.noreply.github.com>
2023-11-03 11:31:45 +08:00
liunux4odoo
554122f60e
Feat ( #1951 )
...
* 知识库支持子目录(不包括temp和tmp开头的目录),文件相对路径总长度不可超过255
* init_database.py 增加 --import-db 参数,在版本升级时,如果 info.db
表结构发生变化,但向量库无需重建,可以在重建数据库后,使用本参数从旧的数据库中导入信息
2023-11-02 14:46:39 +08:00
imClumsyPanda
d4b0b4d83d
Update README.md
2023-11-02 13:32:38 +08:00
imClumsyPanda
36584428d5
Add files via upload
2023-11-02 13:31:52 +08:00
liunux4odoo
d8e15b57ba
知识库支持子目录(不包括temp和tmp开头的目录),文件相对路径总长度不可超过255 ( #1928 )
2023-10-31 16:59:40 +08:00
liunux4odoo
65592a45c3
支持在线 Embeddings, Lite 模式支持所有知识库相关功能 ( #1924 )
...
新功能:
- 支持在线 Embeddings:zhipu-api, qwen-api, minimax-api, qianfan-api
- API 增加 /other/embed_texts 接口
- init_database.py 增加 --embed-model 参数,可以指定使用的嵌入模型(本地或在线均可)
- 对于 FAISS 知识库,支持多向量库,默认位置:{KB_PATH}/vector_store/{embed_model}
- Lite 模式支持所有知识库相关功能。此模式下最主要的限制是:
- 不能使用本地 LLM 和 Embeddings 模型
- 知识库不支持 PDF 文件
- init_database.py 重建知识库时不再默认情况数据库表,增加 clear-tables 参数手动控制。
- API 和 WEBUI 中 score_threshold 参数范围改为 [0, 2],以更好的适应在线嵌入模型
问题修复:
- API 中 list_config_models 会删除 ONLINE_LLM_MODEL 中的敏感信息,导致第二轮API请求错误
开发者:
- 统一向量库的识别:以(kb_name,embed_model)为判断向量库唯一性的依据,避免 FAISS 知识库缓存加载逻辑错误
- KBServiceFactory.get_service_by_name 中添加 default_embed_model 参数,用于在构建新知识库时设置 embed_model
- 优化 kb_service 中 Embeddings 操作:
- 统一加载接口: server.utils.load_embeddings,利用全局缓存避免各处 Embeddings 传参
- 统一文本嵌入接口:server.knowledge_base.kb_service.base.[embed_texts, embed_documents]
- 重写 normalize 函数,去除对 scikit-learn/scipy 的依赖
2023-10-31 14:26:50 +08:00
imClumsyPanda
7f9592773b
Update README.md
2023-10-29 14:54:40 +08:00
imClumsyPanda
1eddb2c321
Add files via upload
2023-10-29 14:54:13 +08:00
imClumsyPanda
ff22d5f98f
Update README.md
2023-10-29 14:53:01 +08:00
imClumsyPanda
b1100ddefb
Add files via upload
2023-10-29 14:52:31 +08:00
liunux4odoo
deed92169f
支持在线 Embeddings:zhipu-api, qwen-api, minimax-api, qianfan-api ( #1907 )
...
* 新功能:
- 支持在线 Embeddings:zhipu-api, qwen-api, minimax-api, qianfan-api
- API 增加 /other/embed_texts 接口
- init_database.py 增加 --embed-model 参数,可以指定使用的嵌入模型(本地或在线均可)
问题修复:
- API 中 list_config_models 会删除 ONLINE_LLM_MODEL 中的敏感信息,导致第二轮API请求错误
开发者:
- 优化 kb_service 中 Embeddings 操作:
- 统一加载接口: server.utils.load_embeddings,利用全局缓存避免各处 Embeddings 传参
- 统一文本嵌入接口:server.embedding_api.[embed_texts, embed_documents]
2023-10-28 23:37:30 +08:00
zR
aa7c580974
Dev ( #1902 )
...
修改Agent的内容
2023-10-27 22:53:43 +08:00
zR
bb72d9ac26
支持GLM ( #1896 )
...
* 支持glm3
2023-10-27 17:56:27 +08:00
zR
d054244e55
Dev ( #1895 )
...
* 修复科大讯飞token问题和Azure的token问题
* 合并PR并改变位置
---------
Co-authored-by: zR <zRzRzRzRzRzRzR>
2023-10-27 14:38:24 +08:00
charlesyju
f19211b1f5
support adding keywords to model tokenizer ( #1622 )
...
* support adding keywords to model tokenizer
* add keyword_preprocess.py usage doc
* init new token with good weights
---------
Co-authored-by: Charles Ju <charlesyju@gmail.com>
2023-10-27 13:57:14 +08:00
zR
6ed87954b2
修复科大讯飞token问题和Azure的token问题 ( #1894 )
...
Co-authored-by: zR <zRzRzRzRzRzRzR>
2023-10-27 13:51:59 +08:00
liunux4odoo
b68f7fcdea
修改qianfan-api使用原始post访问,qianfan sdk无法访问
2023-10-27 13:42:16 +08:00
zR
dea468ab0f
Dev ( #1892 )
...
* 支持了agentlm
* 支持了agentlm和相关提示词
* 修改了Agent的一些功能,加入了Embed方面的一个优化
* 修改了部分Agent的工具
* 增加一些Langchain的自带工具
* 修复一些兼容性的bug
* 恢复知识库
* 恢复知识库
* 1
* 修复Azure问题
* 修复zilliz的问题
* 修复Agent历史记录问题,优化知识库问答搜索的uoji
* 修复讯飞大模型token问题
* 修复讯飞大模型token问题和配置文件
---------
Co-authored-by: zR <zRzRzRzRzRzRzR>
2023-10-27 13:14:48 +08:00
zR
24d1e28a07
一些细节优化 ( #1891 )
...
Co-authored-by: zR <zRzRzRzRzRzRzR>
2023-10-27 11:52:44 +08:00
liunux4odoo
ce8e341b9f
update server_config.py.example: qianfan-api 默认模型改为 ERNIE-Bot。qianfan sdk 对模型名称大小写敏感
2023-10-26 22:48:56 +08:00
liunux4odoo
b4c68ddd05
优化在线 API ,支持 completion 和 embedding,简化在线 API 开发方式 ( #1886 )
...
* 优化在线 API ,支持 completion 和 embedding,简化在线 API 开发方式
新功能
- 智谱AI、Minimax、千帆、千问 4 个在线模型支持 embeddings(不通过Fastchat,后续会单独提供相关api接口)
- 在线模型自动检测传入参数,在传入非 messages 格式的 prompt 时,自动转换为 completion 形式,以支持 completion 接口
开发者:
- 重构ApiModelWorker:
- 所有在线 API 请求封装到 do_chat 方法:自动传入参数 ApiChatParams,简化参数与配置项的获取;自动处理与fastchat的接口
- 加强 API 请求错误处理,返回更有意义的信息
- 改用 qianfan sdk 重写 qianfan-api
- 将所有在线模型的测试用例统一在一起,简化测试用例编写
* Delete requirements_langflow.txt
2023-10-26 22:44:48 +08:00
zR
e74fe2d950
Zilliz修复 ( #1874 )
...
* 修复zilliz的问题
2023-10-25 21:59:26 +08:00
zR
35a7ca74c0
Azure 的fschat支持,弃用Langchain-MODEL ( #1873 )
...
* 支持了agentlm
* 支持了agentlm和相关提示词
* 修改了Agent的一些功能,加入了Embed方面的一个优化
* 修改了部分Agent的工具
* 增加一些Langchain的自带工具
* 修复一些兼容性的bug
* 恢复知识库
* 恢复知识库
* 修复Azure问题
2023-10-25 21:32:40 +08:00
liunux4odoo
27418ba9fa
fix bug, add dependencies: strsimpy, markdownify
2023-10-25 08:58:31 +08:00
liunux4odoo
03e55e11c4
支持lite模式:无需安装torch等重依赖,通过在线API实现LLM对话和搜索引擎对话 ( #1860 )
...
* move get_default_llm_model from webui to ApiRequest
增加API接口及其测试用例:
- /server/get_prompt_template: 获取服务器配置的 prompt 模板
- 增加知识库多线程访问测试用例
支持lite模式:无需安装torch等重依赖,通过在线API实现LLM对话和搜索引擎对话
* fix bug in server.api
---------
Co-authored-by: imClumsyPanda <littlepanda0716@gmail.com>
2023-10-25 08:30:23 +08:00
Zhi-guo Huang
be67ea43d8
Merge pull request #1828 from qiankunli/feat/add-completion-api
...
增加completion功能的API接口,注意暂不支持online_api模型
2023-10-24 22:10:54 +08:00
liunux4odoo
19f5f07d57
fix: unused imported faiss in milvus_kb_server ( close #1849 )
2023-10-24 15:01:19 +08:00
jinke
2f67e1d0cc
update docker image to 0.2.6
...
43.4G, chatglm6b+text2vec-bge-large-chinese.
2023-10-24 12:32:26 +08:00
imClumsyPanda
b166457897
Update README.md
2023-10-24 10:43:04 +08:00
imClumsyPanda
e904bc2ade
Add files via upload
2023-10-24 10:42:34 +08:00
imClumsyPanda
68498bd93b
Update README.md
2023-10-23 22:40:14 +08:00