Skip to content

Commit 2b7cde6

Browse files
committed
feat: mcp param
1 parent ad10f05 commit 2b7cde6

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

backend/apps/chat/models/chat_model.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ class Chat(SQLModel, table=True):
2424
chat_type: str = Field(max_length=20, default="chat") # chat, datasource
2525
datasource: int = Field(sa_column=Column(BigInteger, nullable=True))
2626
engine_type: str = Field(max_length=64)
27-
origin: Optional[int] = Field(sa_column=Column(Integer, nullable=False, default=0)) # 0: default, 1: mcp, 2: assistant
27+
origin: Optional[int] = Field(
28+
sa_column=Column(Integer, nullable=False, default=0)) # 0: default, 1: mcp, 2: assistant
2829

2930

3031
class ChatRecord(SQLModel, table=True):
@@ -152,11 +153,12 @@ def filter_user_question(self):
152153

153154

154155
class ChatQuestion(AiModelQuestion):
155-
question: str = ''
156-
chat_id: int = 0
156+
question: str
157+
chat_id: int
158+
157159

158160
class ChatMcp(ChatQuestion):
159-
token: str = ''
161+
token: str
160162

161163

162164
class ChatStart(BaseModel):

0 commit comments

Comments
 (0)