fix: 知识库添加时 vec 变量未初始化导致 embedding 禁用时报错
This commit is contained in:
Binary file not shown.
14
feishu_config_2026-04-02.json
Normal file
14
feishu_config_2026-04-02.json
Normal file
@@ -0,0 +1,14 @@
|
||||
{
|
||||
"feishu": {
|
||||
"app_id": "cli_a8b50ec0eed1500d",
|
||||
"table_id": "tblnl3vJPpgMTSiP",
|
||||
"status": "active",
|
||||
"app_secret": "***"
|
||||
},
|
||||
"system": {
|
||||
"sync_limit": 10,
|
||||
"ai_suggestions_enabled": true,
|
||||
"auto_sync_interval": 0,
|
||||
"last_sync_time": null
|
||||
}
|
||||
}
|
||||
@@ -356,6 +356,7 @@ class KnowledgeManager:
|
||||
|
||||
# 生成 embedding
|
||||
embedding_json = None
|
||||
vec = None
|
||||
text_for_embedding = question + " " + answer
|
||||
if self.embedding_enabled:
|
||||
vec = self.embedding_client.embed_text(text_for_embedding)
|
||||
|
||||
Reference in New Issue
Block a user