chore: model.py fixed
Browse files
Backend/app/schema/models.py
CHANGED
|
@@ -53,15 +53,12 @@ class IngestRequest(BaseModel):
|
|
| 53 |
# #--------Notes models--------#
|
| 54 |
|
| 55 |
class ChatMessage(BaseModel):
|
| 56 |
-
role: Literal[
|
| 57 |
-
content: str=Field(..., min_length=1, description="
|
| 58 |
|
| 59 |
class AI_chat_input(BaseModel):
|
| 60 |
-
messages
|
| 61 |
-
|
| 62 |
-
min_length=1,
|
| 63 |
-
description="The complete conversation history (list of messages) to send to the LLM."
|
| 64 |
-
)
|
| 65 |
session_id: str | None = Field(
|
| 66 |
None, description="The unique ID of the current chat session (optional)."
|
| 67 |
)
|
|
|
|
| 53 |
# #--------Notes models--------#
|
| 54 |
|
| 55 |
class ChatMessage(BaseModel):
|
| 56 |
+
role: Literal["user", "assistant", "system"] = Field(..., description="Role of the message sender")
|
| 57 |
+
content: str = Field(..., min_length=1, description="Message content")
|
| 58 |
|
| 59 |
class AI_chat_input(BaseModel):
|
| 60 |
+
messages: List[ChatMessage] = Field(..., description="Conversation history")
|
| 61 |
+
context: str = Field(..., description="The content of the note/document to chat about")
|
|
|
|
|
|
|
|
|
|
| 62 |
session_id: str | None = Field(
|
| 63 |
None, description="The unique ID of the current chat session (optional)."
|
| 64 |
)
|