Refactor data loading and chatbot into modules - #1
Conversation
There was a problem hiding this comment.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 馃憤.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
| from data_loader import load_files, merge_dataframes | ||
| from chatbot import init_state, handle_user_query | ||
| from prompt_models import generate_prompt | ||
| from execution_programs import execute_code, add_to_history | ||
| from llm_models import code_llm |
There was a problem hiding this comment.
[P0] Import display_history from execution_programs
The refactor replaced the wildcard import of execution_programs with explicit imports but only brought in execute_code and add_to_history. The script still calls display_history() at the end of the Streamlit layout, so the app now raises NameError: name 'display_history' is not defined as soon as the page renders. Add display_history to the imports to keep the app runnable.
Useful? React with 馃憤聽/ 馃憥.
Summary
data_loader.load_filesandmerge_dataframesfor reusechatbot.init_stateandhandle_user_queryapp.pyto import new modules and orchestrate Streamlit layoutTesting
python -m py_compile app.py chatbot.py data_loader.py