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

Update app_v2.py

Browse files
Files changed (1) hide show
  1. app_v2.py +3 -3
app_v2.py CHANGED
@@ -67,8 +67,8 @@ 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"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):
74
  model_family_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 Jimmy responses.\nConversation History:\n{chats}\n\nNew User Input: {prompt}"
71
+ return f"User Input: {prompt}"
72
 
73
  def apply_prompt_syntax(prompt, system_prompt, prompt_template, bake_in_prompt_syntax):
74
  model_family_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\n{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