John Graham Reynolds commited on
Commit
d648be5
·
1 Parent(s): f15be1a

pass user input to semantic search

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -38,7 +38,7 @@ terms like **Data Lake**, **EDW** (Enterprise Data Warehouse), **HCERA** (Health
38
  Try querying the model with any of the example prompts below for a simple introduction to both Vanderbilt-specific and general knowledge queries. The purpose of this
39
  model is to allow VUMC employees access to an intelligent assistant that improves and expedites VUMC work. \n
40
  Feedback and ideas are very welcome! Please provide any feedback, ideas, or issues to the email: **[email protected]**.
41
- We hope to gradually improve this AI assistant to create a large-scale, all-inclusive tool to compliment the work of all VUMC staff."""
42
 
43
  GENERAL_ERROR_MSG = "An error occurred. Please refresh the page to start a new conversation."
44
 
@@ -135,7 +135,7 @@ def chat_api_call(history):
135
 
136
  # ** TODO update this next to take and do similarity search on user input!
137
  st.write(history)
138
- search_result = vector_store.similarity_search(query="Tell me about what a data lake is.", k=5)
139
  chat_completion = search_result # TODO update this after we implement our chain
140
  return chat_completion
141
 
 
38
  Try querying the model with any of the example prompts below for a simple introduction to both Vanderbilt-specific and general knowledge queries. The purpose of this
39
  model is to allow VUMC employees access to an intelligent assistant that improves and expedites VUMC work. \n
40
  Feedback and ideas are very welcome! Please provide any feedback, ideas, or issues to the email: **[email protected]**.
41
+ We hope to gradually improve this AI assistant to create a large-scale, all-inclusive tool to compliment the work of all VUMC staff- your comments are invaluable in this process."""
42
 
43
  GENERAL_ERROR_MSG = "An error occurred. Please refresh the page to start a new conversation."
44
 
 
135
 
136
  # ** TODO update this next to take and do similarity search on user input!
137
  st.write(history)
138
+ search_result = vector_store.similarity_search(query=st.session_state["messages"][-1]["content"], k=5)
139
  chat_completion = search_result # TODO update this after we implement our chain
140
  return chat_completion
141