Add warnings on chat_pandas_df (#30)

This commit is contained in:
Joshua Carroll
2023-08-23 21:37:26 -07:00
committed by GitHub
parent 0d2fc797a7
commit 07c87797b4
2 changed files with 7 additions and 1 deletions
+2 -1
View File
@@ -12,7 +12,8 @@ This repository contains reference implementations of various LangChain agents a
- `simple_feedback.py`: A chat app that allows the user to add feedback on responses using [streamlit-feedback](https://github.com/trubrics/streamlit-feedback), and link to the traces in [LangSmith](https://docs.smith.langchain.com/) ([View the app](https://langsmith-simple-feedback.streamlit.app/))
- `chat_with_documents.py`: Chatbot capable of answering queries by referring custom documents ([View the app](https://langchain-document-chat.streamlit.app/))
- `chat_with_sql_db.py`: Chatbot which can communicate with your database ([View the app](https://langchain-chat-sql.streamlit.app/))
- `chat_pandas_df.py`: Chatbot to ask questions about a pandas DF ([View the app](https://langchain-chat-pandas.streamlit.app/))
- `chat_pandas_df.py`: Chatbot to ask questions about a pandas DF (Note: uses `PythonAstREPLTool` which is vulnerable to arbitrary code execution,
see [langchain #7700](https://github.com/langchain-ai/langchain/issues/7700))
Apps feature LangChain 🤝 Streamlit integrations such as the
[Callback integration](https://python.langchain.com/docs/modules/callbacks/integrations/streamlit) and
+5
View File
@@ -47,6 +47,11 @@ uploaded_file = st.file_uploader(
on_change=clear_submit,
)
if not uploaded_file:
st.warning(
"This app uses LangChain's `PythonAstREPLTool` which is vulnerable to arbitrary code execution. Please use caution in deploying and sharing this app."
)
if uploaded_file:
df = load_data(uploaded_file)