feat: multimodal RAG with PDF image extraction and display
Extract images from PDFs using pymupdf, generate descriptions via Qwen3-VL-8B, store in ChromaDB alongside text chunks, and render images in chat answers. Includes image proxy rewrite, force re-process endpoint, and VLM API timeout. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -65,6 +65,17 @@ class VectorStore:
|
||||
print(f"[DEBUG-VectorStore] 返回结果数量: {len(result)}")
|
||||
return result
|
||||
|
||||
def delete_by_document_id(self, document_id: int) -> bool:
|
||||
"""删除指定文档的所有向量数据"""
|
||||
try:
|
||||
self.vectorstore._collection.delete(
|
||||
where={"document_id": document_id}
|
||||
)
|
||||
return True
|
||||
except Exception as e:
|
||||
print(f"删除向量数据失败: {str(e)}")
|
||||
return False
|
||||
|
||||
def max_marginal_relevance_search(
|
||||
self,
|
||||
query: str,
|
||||
|
||||
Reference in New Issue
Block a user