feat: V1 - DAG编排/告警系统/Agent循环/知识库RAG/Webhook + 审核管理富上下文修复
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
"""Knowledge base schemas."""
|
||||
from pydantic import BaseModel, Field
|
||||
from typing import Optional, List
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
class KnowledgeCreate(BaseModel):
|
||||
title: str = Field(..., min_length=1, max_length=500)
|
||||
content: str = ""
|
||||
doc_type: str = "text"
|
||||
source: str = ""
|
||||
tags: str = ""
|
||||
project_id: Optional[int] = None
|
||||
|
||||
|
||||
class KnowledgeResponse(BaseModel):
|
||||
id: int
|
||||
project_id: Optional[int] = None
|
||||
title: str
|
||||
content: str
|
||||
doc_type: str
|
||||
source: str
|
||||
tags: str
|
||||
tenant_id: int
|
||||
created_at: datetime
|
||||
|
||||
model_config = {"from_attributes": True}
|
||||
|
||||
|
||||
class KnowledgeSearchResult(BaseModel):
|
||||
doc_id: int
|
||||
title: str
|
||||
snippet: str
|
||||
score: float
|
||||
Reference in New Issue
Block a user