forked from taugroup/ThinkTank
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.py
More file actions
55 lines (45 loc) · 1.54 KB
/
Copy pathmodels.py
File metadata and controls
55 lines (45 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from typing import List, Dict, Any, Optional
from pydantic import BaseModel
class FileData(BaseModel):
filename: str
content: str # base64-encoded file content
class FileReference(BaseModel):
original_name: str
size: int
class Expert(BaseModel):
title: str
expertise: str
goal: str
role: str
class Meeting(BaseModel):
project_name: str
experts: List[Expert]
vector_store: Optional[List[List[FileData]]] = [] # Legacy support for base64 files
file_references: Optional[Dict[str, List[FileReference]]] = {} # New: expert_name -> file_references
session_id: Optional[str] = None # For file upload sessions
meeting_topic: str
rounds: int
timestamp: Optional[int] = None
transcript: Optional[List[Dict[str, str]]] = []
summary: Optional[str] = ""
def serialize(self) -> Dict[str, Any]:
return {
"project_name": self.project_name,
"experts": [expert.dict() for expert in self.experts],
"vector_store": self.vector_store,
"meeting_topic": self.meeting_topic,
"rounds": self.rounds,
"timestamp": self.timestamp,
"transcript": self.transcript,
"summary": self.summary
}
class Project(BaseModel):
title: str
description: str
meetings: List[Meeting]
def serialize(self) -> Dict[str, Any]:
return {
"title": self.title,
"description": self.description,
"meetings": [meeting.serialize for meeting in self.meetings]
}