feat: Phase 2.5 - Skill Execution Pipeline + Chat Workflow Enhancement - Stage A: MarketApp->Skill ID mapping, real skill execution engine, SkillVersion snapshot fix - Stage B: AgentConfig dynamic injection, multi-turn context persistence, Function Calling loop (5 rounds) - Stage C: KnowledgeDocumentChunk model, BM25 text retrieval, smart KB context injection - D: PipelineScheduler LLM-based skill pattern extraction replacing mock
This commit is contained in:
1 parent
8ec808b515
commit
5d9d420525
3 files changed
+867
-228
No files matched your search
@@ -202,6 +202,28 @@ class KnowledgeDocument(Base):
|
||||
updated_at = Column(DateTime, default=datetime.now, onupdate=datetime.now)
|
||||
|
||||
|
||||
|
||||
|
||||
class KnowledgeDocumentChunk(Base):
|
||||
"""知识库文档分段表 — Stage C.1"""
|
||||
__tablename__ = "knowledge_document_chunks"
|
||||
|
||||
id = Column(String(36), primary_key=True, default=gen_uuid)
|
||||
document_id = Column(String(36), ForeignKey("knowledge_documents.id"), nullable=False)
|
||||
knowledge_base_id = Column(String(36), ForeignKey("knowledge_bases.id"), nullable=False)
|
||||
chunk_index = Column(Integer, nullable=False, default=0, comment="分段序号")
|
||||
content = Column(Text, nullable=False, comment="分段文本内容")
|
||||
start_char = Column(Integer, default=0, comment="起始字符位置")
|
||||
end_char = Column(Integer, default=0, comment="结束字符位置")
|
||||
chunk_metadata = Column(JSON, default=None, comment="分段元数据(标题、关键词等)")
|
||||
token_count = Column(Integer, default=0, comment="分段token数估算")
|
||||
created_at = Column(DateTime, default=datetime.now)
|
||||
|
||||
__table_args__ = (
|
||||
Index("idx_kdc_doc_id", "document_id"),
|
||||
Index("idx_kdc_kb_id", "knowledge_base_id"),
|
||||
)
|
||||
|
||||
class KnowledgeGraphNode(Base):
|
||||
__tablename__ = "knowledge_graph_nodes"
|
||||
|
||||
|
||||
Reference in new issue
Block a user