Spaces:
Sleeping
Sleeping
Update main.py
Browse files
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 |
-
|
|
|
|
| 54 |
|
| 55 |
headers = {
|
| 56 |
'accept': 'application/json',
|
| 57 |
'Content-Type': 'application/json'
|
| 58 |
}
|
| 59 |
data = {
|
| 60 |
-
"session_token":
|
| 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(
|