Spaces:
Building
Building
Update session.py
Browse files- session.py +5 -5
session.py
CHANGED
@@ -19,7 +19,7 @@ class Session:
|
|
19 |
# Core identifiers
|
20 |
session_id: str
|
21 |
project_name: str
|
22 |
-
|
23 |
|
24 |
# State management - string for better debugging
|
25 |
state: str = "idle" # idle | collect_params | call_api | humanize
|
@@ -120,7 +120,7 @@ class Session:
|
|
120 |
data = {
|
121 |
'session_id': self.session_id,
|
122 |
'project_name': self.project_name,
|
123 |
-
'
|
124 |
'state': self.state,
|
125 |
'current_intent': self.current_intent,
|
126 |
'variables': self.variables,
|
@@ -195,7 +195,7 @@ class SessionStore:
|
|
195 |
def create_session(
|
196 |
self,
|
197 |
project_name: str,
|
198 |
-
|
199 |
is_realtime: bool = False
|
200 |
) -> Session:
|
201 |
"""Create new session"""
|
@@ -204,7 +204,7 @@ class SessionStore:
|
|
204 |
session = Session(
|
205 |
session_id=session_id,
|
206 |
project_name=project_name,
|
207 |
-
|
208 |
is_realtime_session=is_realtime
|
209 |
)
|
210 |
|
@@ -215,7 +215,7 @@ class SessionStore:
|
|
215 |
"Session created",
|
216 |
session_id=session_id,
|
217 |
project=project_name,
|
218 |
-
version=
|
219 |
is_realtime=is_realtime
|
220 |
)
|
221 |
|
|
|
19 |
# Core identifiers
|
20 |
session_id: str
|
21 |
project_name: str
|
22 |
+
version_no: int
|
23 |
|
24 |
# State management - string for better debugging
|
25 |
state: str = "idle" # idle | collect_params | call_api | humanize
|
|
|
120 |
data = {
|
121 |
'session_id': self.session_id,
|
122 |
'project_name': self.project_name,
|
123 |
+
'version_no': self.version_no,
|
124 |
'state': self.state,
|
125 |
'current_intent': self.current_intent,
|
126 |
'variables': self.variables,
|
|
|
195 |
def create_session(
|
196 |
self,
|
197 |
project_name: str,
|
198 |
+
version_no: int,
|
199 |
is_realtime: bool = False
|
200 |
) -> Session:
|
201 |
"""Create new session"""
|
|
|
204 |
session = Session(
|
205 |
session_id=session_id,
|
206 |
project_name=project_name,
|
207 |
+
version_no=version_no,
|
208 |
is_realtime_session=is_realtime
|
209 |
)
|
210 |
|
|
|
215 |
"Session created",
|
216 |
session_id=session_id,
|
217 |
project=project_name,
|
218 |
+
version=version_no,
|
219 |
is_realtime=is_realtime
|
220 |
)
|
221 |
|