Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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,
|
20 |
):
|
21 |
-
|
|
|
|
|
|
|
|
|
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
|