From 0fb0c2c61ef6f48089b941f0e185e51288fe01b0 Mon Sep 17 00:00:00 2001
From: shidong <shidong@jhsoft.cc>
Date: 星期二, 08 七月 2025 19:07:04 +0800
Subject: [PATCH] #2025/7/8 #增了读取知识库ID
---
qwen_detect.py | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/qwen_detect.py b/qwen_detect.py
index 29788f2..6ade8ad 100644
--- a/qwen_detect.py
+++ b/qwen_detect.py
@@ -43,7 +43,7 @@
# 鍔犺浇闆嗗悎
self.collection = Collection(name="smartobject")
self.collection.load()
- self.pool = qwen_thread(int(self.config.get("threadnum")), self.config,"/home/debian/Qwen2.5-VL-3B-Instruct-GPTQ-Int4")
+ self.pool = qwen_thread(int(self.config.get("threadnum")), self.config,self.config.get("qwenaddr"))
#鏄惁鏇存柊
self._isupdate = False
@@ -96,7 +96,7 @@
output_fields=["id", "zh_desc_class", "text_vector", "bounding_box", "video_point_name", "task_id",
"task_name", "event_level_id", "event_level_name",
"video_point_id", "detect_num", "is_waning", "is_desc", "waning_value", "rule_id",
- "detect_id",
+ "detect_id","knowledge_id",
"detect_time", "image_path", "image_desc_path", "video_path"],
consistency_level="Strong",
order_by_field="id", # 鎸塱d瀛楁鎺掑簭
@@ -131,7 +131,8 @@
"image_path": res['image_path'], # image_path
"image_desc_path": res['image_desc_path'], # image_desc_path
"video_path": res['video_path'],
- "text_vector": res['text_vector']
+ "text_vector": res['text_vector'],
+ "knowledge_id": res['knowledge_id']
}
# logging.info(f"璇诲彇鍥惧儚鎴愬姛: {res['id']}")
# 淇濆瓨鍒癿ilvus
--
Gitblit v1.8.0