Skip to content

Commit

Permalink
Feat/0.2.2.4 (#301)
Browse files Browse the repository at this point in the history
[support sensetime
api](0835b40)
  • Loading branch information
yaojin3616 authored Jan 29, 2024
2 parents ca7290d + 4ce24b2 commit f9aa598
Show file tree
Hide file tree
Showing 16 changed files with 438 additions and 19 deletions.
6 changes: 3 additions & 3 deletions docker/docker-compose-model.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
services:
bisheng-rt:
container_name: bisheng-rt
image: dataelement/bisheng-rt:latest
image: dataelement/bisheng-rt:0.0.6.2
shm_size: 10gb
ports:
- "9000:9000"
Expand All @@ -28,7 +28,7 @@ services:

bisheng-unstructured:
container_name: bisheng-unstructured
image: dataelement/bisheng-unstructured:latest
image: dataelement/bisheng-unstructured:0.0.3.2
ports:
- "10001:10001"
environment:
Expand All @@ -39,4 +39,4 @@ services:
interval: 30s
timeout: 20s
retries: 3
restart: on-failure
restart: on-failure
2 changes: 1 addition & 1 deletion docker/mysql/conf/my.cnf
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ init_connect='SET collation_connection = utf8mb4_unicode_ci, NAMES utf8mb4'
character-set-server=utf8mb4
collation-server=utf8mb4_unicode_ci
# skip-character-set-client-handshake
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
sql_mode=STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION
4 changes: 2 additions & 2 deletions src/backend/bisheng/api/v1/knowledge.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def create_knowledge(*,
Authorize.jwt_required()
payload = json.loads(Authorize.get_jwt_subject())
""" 创建知识库. """
knowledge.is_partition = knowledge.is_partition or settings.vectorstores.get('Milvus', {}).get(
'is_partition', True)
knowledge.is_partition = knowledge.is_partition or settings.get_knowledge().get(
'vectorstores', {}).get('Milvus', {}).get('is_partition', True)
db_knowldge = Knowledge.model_validate(knowledge)
know = session.exec(
select(Knowledge).where(Knowledge.name == knowledge.name,
Expand Down
2 changes: 2 additions & 0 deletions src/backend/bisheng/default_node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,8 @@ llms:
documentation: ""
CustomLLMChat:
documentation: ""
SenseChat:
documentation: ""
###
# There's a bug in this component deactivating until we get it sorted: _language_models.py", line 804, in send_message
# is_blocked=safety_attributes.get("blocked", False),
Expand Down
8 changes: 4 additions & 4 deletions src/backend/bisheng/initdb_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ knowledges:
# openai_api_version: "" # azure api_version
embedding-host: # 知识库下拉框中显示的embedding模型的名称,可自定义
host_base_url: "" # 在模型管理页面中已上线的embedding服务的地址
model: "" # 在模型管理页面中已上线的embedding模型的名称
model: "" # 在模型管理页面中已上线的embedding模型的名称
vectorstores:
# Milvus 最低要求cpu 4C 8G 推荐4C 16G
Milvus: # 如果需要切换其他vectordb,确保其他服务已经启动,然后配置对应参数
connection_args: {'host': 'milvus', 'port': '19530', 'user': '', 'password': '', 'secure': False}
# partiton-key model, 用于分区的字段,如果不配置默认True, 分区后,新的partiton不会新建collection,可以通过增加suffix强制增加collection
# is_partition: True
# partition_suffix: 1
is_partition: False
partition_suffix: 1
# 可选配置,有些类型的场景使用ES可以提高召回效果
ElasticKeywordsSearch:
elasticsearch_url: 'http://elasticsearch:9200'
Expand Down Expand Up @@ -53,4 +53,4 @@ use_captcha:

# 聊天对话框配置
dialog_tips:
"欢迎使用bisheng,我们github地址:https://github.com/dataelement/bisheng, 有问题可以提issue,我们会尽快回复您。"
"内容由AI生成,仅供参考!"
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@
from .wenxin import ChatWenxin
from .xunfeiai import ChatXunfeiAI
from .zhipuai import ChatZhipuAI
from .sensetime import SenseChat

__all__ = [
'ProxyChatLLM', 'ChatMinimaxAI', 'ChatWenxin', 'ChatZhipuAI', 'ChatXunfeiAI', 'HostChatGLM',
'HostBaichuanChat', 'HostLlama2Chat', 'HostQwenChat', 'CustomLLMChat', 'ChatQWen'
'HostBaichuanChat', 'HostLlama2Chat', 'HostQwenChat', 'CustomLLMChat', 'ChatQWen', 'SenseChat'
]
Loading

0 comments on commit f9aa598

Please sign in to comment.