johann22 commited on
Commit
d816c58
1 Parent(s): 530f3b3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -16,9 +16,13 @@ def format_prompt(message, history):
16
  return prompt
17
 
18
  def generate(
19
- prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, agent=None,
20
  ):
21
- system_prompt=prompts.agent
 
 
 
 
22
  temperature = float(temperature)
23
  if temperature < 1e-2:
24
  temperature = 1e-2
 
16
  return prompt
17
 
18
  def generate(
19
+ prompt, history, system_prompt, temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.0, agent_name=None,
20
  ):
21
+ if agent_name = "WEB_DEV":
22
+ agent = prompt.WEB_DEV
23
+ if agent_name = "AI_SYSTEM_PROMPT":
24
+ agent = prompt.AI_SYSTEM_PROMPT
25
+ system_prompt=agent
26
  temperature = float(temperature)
27
  if temperature < 1e-2:
28
  temperature = 1e-2