Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
conversation history
Browse files- app/models.py +6 -0
app/models.py
CHANGED
|
@@ -21,6 +21,12 @@ class GraphState(TypedDict):
|
|
| 21 |
metadata_filters: Optional[Dict[str, Any]]
|
| 22 |
metadata: Dict[str, Any]
|
| 23 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 24 |
class ChatUIInput(BaseModel):
|
| 25 |
"""Input model for text-only ChatUI requests"""
|
| 26 |
text: str # Legacy: full concatenated prompt (for backward compatibility)
|
|
|
|
| 21 |
metadata_filters: Optional[Dict[str, Any]]
|
| 22 |
metadata: Dict[str, Any]
|
| 23 |
|
| 24 |
+
class Message(BaseModel):
|
| 25 |
+
"""Single message in conversation history"""
|
| 26 |
+
role: str # 'user', 'assistant', or 'system'
|
| 27 |
+
content: str
|
| 28 |
+
id: Optional[str] = None
|
| 29 |
+
|
| 30 |
class ChatUIInput(BaseModel):
|
| 31 |
"""Input model for text-only ChatUI requests"""
|
| 32 |
text: str # Legacy: full concatenated prompt (for backward compatibility)
|