broadfield-dev commited on
Commit
6d6a9ea
·
verified ·
1 Parent(s): bcfdd25

Update processor.py

Browse files
Files changed (1) hide show
  1. processor.py +5 -1
processor.py CHANGED
@@ -303,7 +303,11 @@ class DatasetCommandCenter:
303
 
304
  elif t_type == 'requests':
305
  # Lazy Context Creation: Only pay the cost if used
306
- new_row[target_col] = requests.post(col_def['rurl'], json={col_def['rpay']}).text
 
 
 
 
307
 
308
  except Exception as e:
309
  raise ValueError(f"Column '{target_col}' failed: {str(e)}")
 
303
 
304
  elif t_type == 'requests':
305
  # Lazy Context Creation: Only pay the cost if used
306
+ eval_context = row.copy()
307
+ eval_context['row'] = row
308
+ val = eval(json.loads(col_def['rpay']), {}, eval_context)
309
+
310
+ new_row[target_col] = requests.post(col_def['rurl'], json=val).text
311
 
312
  except Exception as e:
313
  raise ValueError(f"Column '{target_col}' failed: {str(e)}")