Samuele Marro commited on
Commit
7b2f713
1 Parent(s): e5465b9

Fixed & improved error messages.

Browse files
Files changed (1) hide show
  1. flow.py +10 -2
flow.py CHANGED
@@ -122,6 +122,9 @@ def full_flow(schema, alice_model, bob_model):
122
  try:
123
  response = executor.run_routine(ARTIFACTS['protocol']['hash'], ARTIFACTS['implementation_receiver'], query, tools)
124
  except Exception as e:
 
 
 
125
  STRUCTURED_MESSAGES.append({
126
  'role': 'user',
127
  'status': 'error',
@@ -163,10 +166,15 @@ def full_flow(schema, alice_model, bob_model):
163
  try:
164
  executor.run_routine(protocol_hash, implementation_sender, task_data, [send_tool])
165
  except Exception as e:
 
 
 
 
 
166
  STRUCTURED_MESSAGES.append({
167
  'role': 'assistant',
168
- 'status': 'success',
169
- 'error': str(e)
170
  })
171
 
172
  def get_info():
 
122
  try:
123
  response = executor.run_routine(ARTIFACTS['protocol']['hash'], ARTIFACTS['implementation_receiver'], query, tools)
124
  except Exception as e:
125
+ import traceback
126
+ traceback.print_exc()
127
+
128
  STRUCTURED_MESSAGES.append({
129
  'role': 'user',
130
  'status': 'error',
 
166
  try:
167
  executor.run_routine(protocol_hash, implementation_sender, task_data, [send_tool])
168
  except Exception as e:
169
+ # Print the error
170
+
171
+ import traceback
172
+ traceback.print_exc()
173
+
174
  STRUCTURED_MESSAGES.append({
175
  'role': 'assistant',
176
+ 'status': 'error',
177
+ 'message': str(e)
178
  })
179
 
180
  def get_info():