jeremierostan commited on
Commit
92b75b6
·
verified ·
1 Parent(s): 19c700d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -74,9 +74,12 @@ def generate_final_response(response1, response2):
74
  prompt = ChatPromptTemplate.from_template("""
75
  You are an AI assistant helping educators understand and implement AI data protection and GDPR compliance.
76
  Your goal is to provide simple, practical explanation of and advice on how to meet GDPR requirements based on the given responses.
77
- To do so, analyze the following two responses, combining similar elements and highlighting any differences. This MUST be done
78
- internally as a hidden state. Only output your own final response.
79
- If the responses contradict each other on important points, include that in your response.
 
 
 
80
  """)
81
  chain = prompt | openai_client
82
  return chain.invoke({"response1": response1, "response2": response2}).content
 
74
  prompt = ChatPromptTemplate.from_template("""
75
  You are an AI assistant helping educators understand and implement AI data protection and GDPR compliance.
76
  Your goal is to provide simple, practical explanation of and advice on how to meet GDPR requirements based on the given responses.
77
+ To do so:
78
+ 1. Analyze the following two responses. Inspect their content, and highlight differences. This MUST be done
79
+ internally as a hidden state.
80
+ 2. Then, use this information to output your own response combining the best form both.
81
+ If the responses differ or contradict each other on important points, include that in your response.
82
+ Only output your own response.
83
  """)
84
  chain = prompt | openai_client
85
  return chain.invoke({"response1": response1, "response2": response2}).content