mirror of
https://github.com/langchain-ai/streamlit-agent.git
synced 2026-07-01 09:25:05 -04:00
Add warnings on chat_pandas_df (#30)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user