coze-dev / coze-dev/coze-studio
知识库文档解析报错:code=105000004 ,dense_text_content vector dim 1024 not match collection definition, which has dim of 2048
- Dominant language
- TypeScript
- Stars
- 21.6k
- Forks
- 3.1k
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
A clear and concise description of what the bug is.
知识库中添加文件向量化失败,看起来.env的配置没有生效,在模型管理后台也配置了openai的bge-m3,但都没用
报错:
code=105000004 message=SearchStore operation failed: store search store failed, err: [Store] upsert failed, params column dense_text_content vector dim 1024 not match collection definition, which has dim of 2048
.env embedding配置:
export EMBEDDING_TYPE="openai"
export EMBEDDING_MAX_BATCH_SIZE=100
export ARK_EMBEDDING_BASE_URL="" # (string, required) Ark embedding base_url
export ARK_EMBEDDING_MODEL="" # (string, required) Ark embedding model
export ARK_EMBEDDING_API_KEY="" # (string, required) Ark embedding api_key
export ARK_EMBEDDING_DIMS="2048" # (int, required) Ark embedding dimensions
export ARK_EMBEDDING_API_TYPE="" # (string, optional) Ark embedding api type, should be "text_api" / "multi_modal_api". Default "text_api".
export OPENAI_EMBEDDING_BASE_URL="http://xxxx:8090/v1" # (string, required) OpenAI embedding base_url
export OPENAI_EMBEDDING_MODEL="bge-m3" # (string, required) OpenAI embedding model
export OPENAI_EMBEDDING_API_KEY="" # (string, required) OpenAI embedding api_key
export OPENAI_EMBEDDING_BY_AZURE=false # (bool, optional) OpenAI embedding by_azure
export OPENAI_EMBEDDING_API_VERSION="" # (string, optional) OpenAI embedding azure api version
export OPENAI_EMBEDDING_DIMS=1024 # (int, required) OpenAI embedding dimensions
export OPENAI_EMBEDDING_REQUEST_DIMS=1024 # (int, optional) OpenAI embedding dimensions in requests, need to be empty if api doesn't support specifying dimensions.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Version:**
Please provide the version of {project_name} you are using.
**Environment:**
The output of `go env`.
**Additional context**
Add any other context about the problem here.
Contributor guide
Research direction
Start by checking how the .env embedding settings are loaded and how the vector collection dimension is defined. Compare the configured/requested 1024-dimensional embedding with the collection's 2048-dimensional definition; done means file vectorization succeeds without the dimension-mismatch error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- ai, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100