You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace codeinterpreterapi with PythonREPL and update models to gpt-5.4
The interpreter tool previously relied on codeinterpreterapi (remote sandbox) which is no longer
compatible with the current dependency stack. This replaces it with langchain_experimental
PythonREPL (local execution) while preserving the same agent contract.
Key changes:
- tool_interpreter.py: rewrite using PythonREPL — injects file previews (columns, dtypes,
3-row sample) into the LLM prompt so generated code uses exact column names; truncates
REPL stdout at 2000 chars to prevent context overflow; wires shared llm_instance from
the agent instead of instantiating a separate model
- agent.py: passes llm_instance to tool constructor via import_tools introspection
- params.ini: bump default OpenAI models from gpt-4o / gpt-4o-mini to gpt-5.4 / gpt-5.4-mini
- requirements.txt / environment.yml: pin langchain_experimental==0.3.4 and remove
codeinterpreterapi / codeboxapi dependencies
- Remove custom_sqlite_file.py (unused after langgraph checkpoint refactor)
Security note: PythonREPL executes LLM-generated code in-process without sandboxing.
A warning comment has been added; restrict to trusted deployment environments.
"You are an interpreter helping to analyze different questions, files and outputs generated from a series of LLMs."
71
-
f"The details of the current request: {input}"
72
-
"Please interpret the current request to generate a meaningful answer."
73
-
"Here's some instructions that you have to follow for acheiving the task:"
74
-
"1. For any file provided, analyse if and provide clear and brief information about it unless something else is asked."
75
-
"2. Only if a specific visualization (e.g., bar chart, diagram) is requested in the question, use the provided information to generate a .json file containing the JSON code for a Plotly graph. This file should be named identically to the analyzed file."
76
-
"3. After you finish your tasks, your answer should contain both the interpretation asked and the full visualization file name if visualization was requested."
77
-
)
78
-
79
-
files= []
80
-
81
-
forfileinfile_paths:
82
-
files.append(File.from_path(file))
83
-
logger.info(f"File added to interpreter Agent: {file}")
84
-
85
-
ifnotfiles:
86
-
87
-
logger.info("No files provided from the Interpreter Agent. Manually scrapping the database")
88
-
output_merged=db_manager.get("tool_merge_result") # Get all file paths from the database associated with the tool_interpreter
0 commit comments