ppsingh commited on
Commit
d504cba
·
verified ·
1 Parent(s): c074a78

Update appStore/rag.py

Browse files
Files changed (1) hide show
  1. appStore/rag.py +7 -1
appStore/rag.py CHANGED
@@ -47,7 +47,13 @@ def run_query(context, label, model_sel_name):
47
  Summarize provided test
48
  '''
49
  chatbot_role = """You are an analyst specializing in climate change impact assessments and producing insights from policy documents."""
50
- messages = [{"role": "system", "content": chatbot_role},{"role": "user", "content": get_prompt(context, label)}]
 
 
 
 
 
 
51
 
52
  # Initialize the client, pointing it to one of the available models
53
  client = InferenceClient(model_sel_name, token=hf_token)
 
47
  Summarize provided test
48
  '''
49
  chatbot_role = """You are an analyst specializing in climate change impact assessments and producing insights from policy documents."""
50
+
51
+ ### adding new template which doesnt need 'system' role [Further investigation needed if its applicable to all mmodels or not]
52
+ messages = [{"role": "user", "content": chatbot_role + get_prompt(context, label)}]
53
+
54
+
55
+ ## old template
56
+ #messages = [{"role": "system", "content": chatbot_role},{"role": "user", "content": get_prompt(context, label)}]
57
 
58
  # Initialize the client, pointing it to one of the available models
59
  client = InferenceClient(model_sel_name, token=hf_token)