2023-10-26 01:47:42 +00:00
|
|
|
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": [],
|
|
|
|
}
|
|
|
|
)
|
2024-02-10 00:13:30 +00:00
|
|
|
print(response) # noqa: T201
|
2023-10-26 01:47:42 +00:00
|
|
|
|
|
|
|
follow_up_question = "What are their objectives?"
|
|
|
|
|
|
|
|
response = chain.invoke(
|
|
|
|
{
|
|
|
|
"question": follow_up_question,
|
|
|
|
"chat_history": [
|
|
|
|
"What is the nasa sales team?",
|
2023-10-27 02:44:30 +00:00
|
|
|
"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)",
|
2023-10-26 01:47:42 +00:00
|
|
|
],
|
|
|
|
}
|
|
|
|
)
|
|
|
|
|
2024-02-10 00:13:30 +00:00
|
|
|
print(response) # noqa: T201
|