Coze Studio 开源版支持自定义设置知识库向量化依赖的 Embedding
模型,使知识库的向量化环节效果更符合指定场景的业务需求。
此处向量化存储模块使用默认的
milvus,按照如下方式设置 Embedding 模型。
1 2
#编辑.env root@ksp-registry:/opt/code_repos/coze-studio/docker# vi .env
1 2 3 4 5 6 7 8 9 10 11 12 13 14
... # Settings for Embedding # The Embedding model relied on by knowledge base vectorization does not need to be configured # if the vector database comes with built-in Embedding functionality (such as VikingDB). Currently, # Coze Studio supports four access methods: openai, ark, ollama, and custom http. Users can simply choose one of them when using # embedding type: openai / ark / ollama / http #export EMBEDDING_TYPE="ark" export EMBEDDING_TYPE="ollama"
#重启服务 root@ksp-registry:/opt/code_repos/coze-studio/docker# docker-compose up -d --force-recreate --no-deps coze-server
配置AI 生成模型(Model)
Coze Studio 知识库提供文本转 SQL(NL2SQL)、一句话生成 Query(Message
to Query)、图像标注(Image Annotation)、workflow
大模型节点召回知识库等功能,这些功能统一依赖于 Coze Studio 预配置的 AI
生成模型。在 Coze Studio 开源版中使用这些功能前,你需要先配置这个AI
生成模型。
此处配置的 AI 生成模型只在 NL2SQL、Message to Query、Image
Annotation、Workflow knowledge recall 四个场景中生效。
#编辑.env root@ksp-registry:/opt/code_repos/coze-studio/docker# vi .env
1 2 3 4 5 6 7 8 9 10
... # Settings for OCR # If you want to use the OCR-related functions in the knowledge base feature,You need to set up the OCR configuration. # Currently, Coze Studio has built-in Volcano OCR. # Supported OCR types: `ve`, `paddleocr` export OCR_TYPE="ve" # ve ocr export VE_OCR_AK="AKLTZWI1ZmQ5YzUxNjVkNDQ3N2FjN2Nk**************" export VE_OCR_SK="TVRRMllqRTFOelpoT1dKbE5EQXpOR0pt****************************" ...
1 2
#重启服务 root@ksp-registry:/opt/code_repos/coze-studio/docker# docker-compose up -d --force-recreate --no-deps coze-server
4.2
知识库文档向量化时提示“SearchStore operation failed: store search store
failed”
从nomic-embed-text:latest转到使用bge-m3:latest,知识库中上传文件时解析到50%左右提示“code=105000004
message=SearchStore operation failed: store search store failed, err:
[Store] upsert failed, the length(102400) of float data should divide
the dim(768)”