LeavingLasVegas commited on
Commit
5a78602
1 Parent(s): ba5cedf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -87,6 +87,8 @@ class Query_Agent:
87
  matches_text = self.query_vector_store(user_query_plus_conversation, query_topic, index)
88
 
89
  if head_agent.relevant_documents_agent.is_relevant(matches_text, user_query_plus_conversation) or contains_py_filename(matches_text):
 
 
90
  response = head_agent.answering_agent.generate_response(user_query, matches_text, conversation, head_agent.selected_mode)
91
  else:
92
  prompt_for_gpt = f"Return a response to this query: {user_query} in the context of this conversation: {conversation}. Please use language appropriate for a {head_agent.selected_mode}."
 
87
  matches_text = self.query_vector_store(user_query_plus_conversation, query_topic, index)
88
 
89
  if head_agent.relevant_documents_agent.is_relevant(matches_text, user_query_plus_conversation) or contains_py_filename(matches_text):
90
+ if query_topic == 'python':
91
+ user_query = user_query + " Please use Python Code in your response."
92
  response = head_agent.answering_agent.generate_response(user_query, matches_text, conversation, head_agent.selected_mode)
93
  else:
94
  prompt_for_gpt = f"Return a response to this query: {user_query} in the context of this conversation: {conversation}. Please use language appropriate for a {head_agent.selected_mode}."