Spaces:
Running
Running
david-oplatka
commited on
Commit
•
3f1dae8
1
Parent(s):
33664cb
Fix unique session id
Browse files
app.py
CHANGED
@@ -16,7 +16,9 @@ from vectara_agent.agent import AgentStatusType
|
|
16 |
from agent import initialize_agent, get_agent_config
|
17 |
|
18 |
# Setup for HTTP API Call to Amplitude Analytics
|
19 |
-
device_id
|
|
|
|
|
20 |
headers = {
|
21 |
'Content-Type': 'application/json',
|
22 |
'Accept': '*/*'
|
@@ -118,7 +120,7 @@ def launch_bot():
|
|
118 |
"event_properties": {
|
119 |
"query": prompt,
|
120 |
"Space Name": "ev-assistant"
|
121 |
-
|
122 |
}]
|
123 |
}
|
124 |
|
|
|
16 |
from agent import initialize_agent, get_agent_config
|
17 |
|
18 |
# Setup for HTTP API Call to Amplitude Analytics
|
19 |
+
if 'device_id' not in locals():
|
20 |
+
device_id = str(uuid.uuid4())
|
21 |
+
|
22 |
headers = {
|
23 |
'Content-Type': 'application/json',
|
24 |
'Accept': '*/*'
|
|
|
120 |
"event_properties": {
|
121 |
"query": prompt,
|
122 |
"Space Name": "ev-assistant"
|
123 |
+
}
|
124 |
}]
|
125 |
}
|
126 |
|