MilanM commited on
Commit
353c0d2
·
verified ·
1 Parent(s): f126d3d

Update app_v2.py

Browse files
Files changed (1) hide show
  1. app_v2.py +2 -2
app_v2.py CHANGED
@@ -67,7 +67,7 @@ def setup_client():
67
  def prepare_prompt(prompt, chat_history):
68
  if genparam.TYPE == "chat" and chat_history:
69
  chats = "\n".join([f"{message['role']}: \"{message['content']}\"" for message in chat_history])
70
- return f"Conversation History:\n{chats}\n\nNew User Input: {prompt}"
71
  return prompt
72
 
73
  def apply_prompt_syntax(prompt, system_prompt, prompt_template, bake_in_prompt_syntax):
@@ -85,7 +85,7 @@ def apply_prompt_syntax(prompt, system_prompt, prompt_template, bake_in_prompt_s
85
  "granite_code - with system": """System:\n{system_prompt}\n\nQuestion:\n{prompt}\n\nAnswer:\n""",
86
  "granite_code - instruction only": """Question:\n{prompt}\n\nAnswer:\n""",
87
  ### Mistral Models
88
- "mistral_large - sys": """[INST] {system_prompt}\n\nUser Input:{prompt}[/INST] Jimmy:""", ### mistral-large-2407
89
  # "mistral_large - sys": """[INST] {system_prompt}\n\nUser Input:{prompt}[/INST]""", ### mistral-large-2407
90
 
91
  "mistral_large - sys base": """[INST] {system_prompt}\n\n{prompt}[/INST]""", ### mistral-large-2407
 
67
  def prepare_prompt(prompt, chat_history):
68
  if genparam.TYPE == "chat" and chat_history:
69
  chats = "\n".join([f"{message['role']}: \"{message['content']}\"" for message in chat_history])
70
+ return f"Do not add quotations to responses. Conversation History:\n{chats}\n\nNew User Input: {prompt}"
71
  return prompt
72
 
73
  def apply_prompt_syntax(prompt, system_prompt, prompt_template, bake_in_prompt_syntax):
 
85
  "granite_code - with system": """System:\n{system_prompt}\n\nQuestion:\n{prompt}\n\nAnswer:\n""",
86
  "granite_code - instruction only": """Question:\n{prompt}\n\nAnswer:\n""",
87
  ### Mistral Models
88
+ "mistral_large - sys": """[INST] {system_prompt}\n\nUser Input:{prompt}[/INST] Jimmy: """, ### mistral-large-2407
89
  # "mistral_large - sys": """[INST] {system_prompt}\n\nUser Input:{prompt}[/INST]""", ### mistral-large-2407
90
 
91
  "mistral_large - sys base": """[INST] {system_prompt}\n\n{prompt}[/INST]""", ### mistral-large-2407