Merge pull request #115 from connorsutton/main
Browse files
langchain-streamlit-demo/app.py
CHANGED
@@ -499,7 +499,7 @@ if st.session_state.llm:
|
|
499 |
doc_chain_tool = Tool.from_function(
|
500 |
func=lambda s: st.session_state.doc_chain.invoke(
|
501 |
s,
|
502 |
-
|
503 |
),
|
504 |
name="user-document-chat",
|
505 |
description="this assistant returns a response based on the user's custom context. ",
|
@@ -510,10 +510,12 @@ if st.session_state.llm:
|
|
510 |
doc_question_tool = Tool.from_function(
|
511 |
func=lambda s: doc_chain_agent.invoke(
|
512 |
s,
|
|
|
513 |
),
|
514 |
name="document-question-tool",
|
515 |
description="this assistant answers a question based on the user's custom context. "
|
516 |
"this assistant responds to fully formed questions."
|
|
|
517 |
"if the user's meaning is unclear, perhaps the answer is here. "
|
518 |
"generally speaking, try this tool before conducting web research.",
|
519 |
)
|
|
|
499 |
doc_chain_tool = Tool.from_function(
|
500 |
func=lambda s: st.session_state.doc_chain.invoke(
|
501 |
s,
|
502 |
+
config=get_config(callbacks),
|
503 |
),
|
504 |
name="user-document-chat",
|
505 |
description="this assistant returns a response based on the user's custom context. ",
|
|
|
510 |
doc_question_tool = Tool.from_function(
|
511 |
func=lambda s: doc_chain_agent.invoke(
|
512 |
s,
|
513 |
+
config=get_config(callbacks),
|
514 |
),
|
515 |
name="document-question-tool",
|
516 |
description="this assistant answers a question based on the user's custom context. "
|
517 |
"this assistant responds to fully formed questions."
|
518 |
+
"Do not send anything besides a question. It already has context."
|
519 |
"if the user's meaning is unclear, perhaps the answer is here. "
|
520 |
"generally speaking, try this tool before conducting web research.",
|
521 |
)
|