mirror of
https://github.com/hwchase17/langchain.git
synced 2025-09-01 11:02:37 +00:00
Templates (#12294)
Co-authored-by: Harrison Chase <hw.chase.17@gmail.com> Co-authored-by: Lance Martin <lance@langchain.dev> Co-authored-by: Jacob Lee <jacoblee93@gmail.com>
This commit is contained in:
31
templates/rag-elasticsearch/main.py
Normal file
31
templates/rag-elasticsearch/main.py
Normal file
@@ -0,0 +1,31 @@
|
||||
from rag_elasticsearch 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)
|
Reference in New Issue
Block a user