po5302006 commited on
Commit
6c5d72f
1 Parent(s): a81ed6c

updated post prompt from main

Browse files
Files changed (1) hide show
  1. Home.py +17 -12
Home.py CHANGED
@@ -148,18 +148,23 @@ agent = (
148
  )
149
  agent_executor = AgentExecutor(tools=[retriever_tool], agent=agent, verbose=True)
150
 
151
- post_prompt = """Do not give me any information that is not included in the document.
152
- If you do not have an answer, say 'I do not have an answer for that, please ask another question. If you need more context from the user, ask them to
153
- provide more context in the next query. Do not include games that contain the queried game in the title.
 
 
 
 
 
154
  """
155
 
156
- st.header("🕹️ GameInsightify")
157
- st.title(f"Your Personal :green[Game Recommender]")
158
  # Description for users
159
- st.markdown("<p style='text-align: center;'>Welcome to GameInsightify! This chatbot will help you find the perfect game based on your preferences. \nJust type in what you're looking for in a game, and let our AI assistant provide recommendations.\n</h1>",
160
- unsafe_allow_html=True)
161
- st.image('./data/img/demoGIF.gif', caption='demonstration on using our app')
162
- st.markdown("""***""")
163
 
164
  # Initialize chat history
165
  if "messages" not in st.session_state:
@@ -170,7 +175,7 @@ if 'gamenames' not in st.session_state:
170
  # Slider on range and button to clear chat history
171
  col1, col2= st.columns([8,2])
172
  with col1:
173
- pass
174
  with col2:
175
  if st.button("Clear chat"):
176
  st.session_state.messages = []
@@ -233,7 +238,7 @@ if prompt := st.chat_input("Need a game recommendation?"):
233
 
234
  # Add assistant response to chat history
235
  st.session_state.messages.append({"role": "assistant", "content": full_response})
236
- if is_plot: st.session_state.gamenames.append(top_games)
237
 
238
  col1, col2, col3= st.columns([4,2,4])
239
  with col2:
@@ -251,4 +256,4 @@ div.stTabs {
251
  overflow-x: hidden;
252
  }
253
  '''
254
- st.markdown(f'<style>{css}</style>', unsafe_allow_html=True)
 
148
  )
149
  agent_executor = AgentExecutor(tools=[retriever_tool], agent=agent, verbose=True)
150
 
151
+ post_prompt = """
152
+ Respond with a respectable and friendy tone.
153
+ If you are able to, provide the links to the steam site for the games answer.
154
+ Do not give me any information that is not included in the document.
155
+ If you do not have an answer, your response should be kind and apologetic, as to why you do not have an answer.
156
+ If you need more context from the user, ask them to provide more context in the next query. Do not include games that contain the queried game in the title.
157
+ If a user asks for a type of game, use that type to find a game that mentions the type.
158
+ If a user asks for a specific number of games, and you cannot provide that, answer with what games you found and explain why you could not find others.
159
  """
160
 
161
+ st.header("🕹️ GameInsightify - Your Personal Game Recommender")
162
+
163
  # Description for users
164
+ st.markdown("""
165
+ Welcome to GameInsightify! This chatbot will help you find the perfect game based on your preferences.
166
+ Just type in what you're looking for in a game, and let our AI assistant provide recommendations.
167
+ """)
168
 
169
  # Initialize chat history
170
  if "messages" not in st.session_state:
 
175
  # Slider on range and button to clear chat history
176
  col1, col2= st.columns([8,2])
177
  with col1:
178
+ st.title("Game Recommender")
179
  with col2:
180
  if st.button("Clear chat"):
181
  st.session_state.messages = []
 
238
 
239
  # Add assistant response to chat history
240
  st.session_state.messages.append({"role": "assistant", "content": full_response})
241
+ if is_plot: st.session_state.gamename.append(docs['name'])
242
 
243
  col1, col2, col3= st.columns([4,2,4])
244
  with col2:
 
256
  overflow-x: hidden;
257
  }
258
  '''
259
+ st.markdown(f'<style>{css}</style>', unsafe_allow_html=True)