pvanand commited on
Commit
a974aa2
·
verified ·
1 Parent(s): 45c01a3

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -2
main.py CHANGED
@@ -50,14 +50,15 @@ def execute_python(code: str, config: RunnableConfig):
50
  code: Valid Python code with correct indentation and syntax including necessary imports.
51
  """
52
 
53
- #print(config)
 
54
 
55
  headers = {
56
  'accept': 'application/json',
57
  'Content-Type': 'application/json'
58
  }
59
  data = {
60
- "session_token": config.configurable.get("thread_id", "test"),
61
  "code": code
62
  }
63
  response = requests.post(
 
50
  code: Valid Python code with correct indentation and syntax including necessary imports.
51
  """
52
 
53
+ thread_config = config.get("configurable", {})
54
+ session_token = thread_config.get("thread_id", "test")
55
 
56
  headers = {
57
  'accept': 'application/json',
58
  'Content-Type': 'application/json'
59
  }
60
  data = {
61
+ "session_token": session_token,
62
  "code": code
63
  }
64
  response = requests.post(