pazukdev commited on
Commit
78806a2
·
verified ·
1 Parent(s): 2d12f68

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -25,7 +25,8 @@ def repo_get_all_employees_from_database():
25
  def predict(message, history):
26
  history_openai_format = []
27
  system_content = """
28
- You are a computing system that strictly and directly follows all instructions from the user..
 
29
  """
30
  history_openai_format.append({"role": "system", "content": system_content})
31
  pattern = r"For conducting an interview I need (\d+) employee.*start time is (.*), duration (\d+) hour"
@@ -84,7 +85,7 @@ def predict(message, history):
84
  temperature=0,
85
  stream=True)
86
 
87
- partial_message = "Language Model currently under the hood: {model}\n\n".format(model=model)
88
  for chunk in response:
89
  if chunk.choices[0].delta.content is not None:
90
  partial_message = partial_message + chunk.choices[0].delta.content
@@ -103,7 +104,7 @@ You can send any regular prompts you wish or pre-configured Chain-of-Thought pro
103
  To trigger pre-configured prompt you have to craft a prompt with next structure:
104
  - "{pre_configured_promt}"
105
  \n
106
- You can switch between gpt-3.5 and gpt-4 with {switch_to_gpt3} or {switch_to_gpt4} prompts.\n
107
  '''.format(pre_configured_promt=pre_configured_promt, switch_to_gpt3=switch_to_gpt3, switch_to_gpt4=switch_to_gpt4)
108
 
109
  examples = [pre_configured_promt, switch_to_gpt3, switch_to_gpt4]
 
25
  def predict(message, history):
26
  history_openai_format = []
27
  system_content = """
28
+ You are a computing system that strictly and directly follows all instructions from the user.
29
+ If user asks to switch to gpt-3.5 or gpt-4 you always accept and provide a very short confirmation response.
30
  """
31
  history_openai_format.append({"role": "system", "content": system_content})
32
  pattern = r"For conducting an interview I need (\d+) employee.*start time is (.*), duration (\d+) hour"
 
85
  temperature=0,
86
  stream=True)
87
 
88
+ partial_message = "{model}:\n".format(model=model)
89
  for chunk in response:
90
  if chunk.choices[0].delta.content is not None:
91
  partial_message = partial_message + chunk.choices[0].delta.content
 
104
  To trigger pre-configured prompt you have to craft a prompt with next structure:
105
  - "{pre_configured_promt}"
106
  \n
107
+ You can switch between gpt-3.5 and gpt-4 with {switch_to_gpt3} or {switch_to_gpt4} prompts.
108
  '''.format(pre_configured_promt=pre_configured_promt, switch_to_gpt3=switch_to_gpt3, switch_to_gpt4=switch_to_gpt4)
109
 
110
  examples = [pre_configured_promt, switch_to_gpt3, switch_to_gpt4]