Self-query template (#12694)

Co-authored-by: Erick Friis <erick@langchain.dev>
This commit is contained in:
Bagatur
2023-11-13 11:44:19 -08:00
committed by GitHub
parent 1e43025bf5
commit 2e42ed5de6
16 changed files with 3240 additions and 21 deletions

View File

@@ -0,0 +1,33 @@
from rag_self_query import chain
if __name__ == "__main__":
questions = [
"What is the nasa sales team?",
"What is our work from home policy?",
"Does the company own my personal project?",
"How does compensation work?",
]
response = chain.invoke(
{
"question": questions[0],
"chat_history": [],
}
)
print(response)
follow_up_question = "What are their objectives?"
response = chain.invoke(
{
"question": follow_up_question,
"chat_history": [
"What is the nasa sales team?",
"The sales team of NASA consists of Laura Martinez, the Area "
"Vice-President of North America, and Gary Johnson, the Area "
"Vice-President of South America. (Sales Organization Overview)",
],
}
)
print(response)