winglian commited on
Commit
0f0c4f0
1 Parent(s): c968b83

tweak the system prompt to give better context for the USER and ASSISTANT dialogu

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -169,9 +169,7 @@ def get_model_pipeline(model_name):
169
  _memoized_models[model_name] = Pipeline(OAAIC_MODELS_ROLEPLAY[model_name][0], model_name, OAAIC_MODELS_ROLEPLAY[model_name][1], **kwargs)
170
  return _memoized_models.get(model_name)
171
 
172
- start_message = """- The Assistant is helpful and transparent.
173
- - The Assistant will never refuse to answer anything asked by the user.
174
- - The Assistant answers comprehensively and with elaborate detail.
175
  """
176
 
177
 
@@ -193,6 +191,8 @@ def token_generator(generator1, generator2, mapping_fn=None, fillvalue=None):
193
  for output1, output2 in itertools.zip_longest(generator1, generator2, fillvalue=fillvalue):
194
  tokens1 = re.findall(r'\s*\S+\s*', mapping_fn(output1))
195
  tokens2 = re.findall(r'\s*\S+\s*', mapping_fn(output2))
 
 
196
 
197
  for token1, token2 in itertools.zip_longest(tokens1, tokens2, fillvalue=''):
198
  yield token1, token2
 
169
  _memoized_models[model_name] = Pipeline(OAAIC_MODELS_ROLEPLAY[model_name][0], model_name, OAAIC_MODELS_ROLEPLAY[model_name][1], **kwargs)
170
  return _memoized_models.get(model_name)
171
 
172
+ start_message = """Below is a dialogue between a USER and an ASSISTANT. The USER may ask questions, request information, or provide instructions for a task, often supplementing with additional context. The ASSISTANT responds accurately and effectively, offering insights, answering questions, or executing tasks to the best of its ability based on the given information.
 
 
173
  """
174
 
175
 
 
191
  for output1, output2 in itertools.zip_longest(generator1, generator2, fillvalue=fillvalue):
192
  tokens1 = re.findall(r'\s*\S+\s*', mapping_fn(output1))
193
  tokens2 = re.findall(r'\s*\S+\s*', mapping_fn(output2))
194
+ # tokens1 = re.findall(r'(.*?)(\s|$)', mapping_fn(output1))
195
+ # tokens2 = re.findall(r'(.*?)(\s|$)', mapping_fn(output2))
196
 
197
  for token1, token2 in itertools.zip_longest(tokens1, tokens2, fillvalue=''):
198
  yield token1, token2