acecalisto3 commited on
Commit
8b5ed81
·
verified ·
1 Parent(s): f2cf017

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -4
app.py CHANGED
@@ -22,6 +22,15 @@ from agent import (
22
  from utils import parse_action, parse_file_content, read_python_module_structure
23
  from datetime import datetime
24
 
 
 
 
 
 
 
 
 
 
25
  now = datetime.now()
26
  date_time_str = now.strftime("%Y-%m-%d %H:%M:%S")
27
 
@@ -230,14 +239,14 @@ def generate(
230
  prompt, history, agent_name=agents[0], sys_prompt="", temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.7,
231
  ):
232
  seed = random.randint(1, 1111111111111111)
233
- agent = prompts.WEB_DEV
234
 
235
  if agent_name == "WEB_DEV":
236
- agent = prompts.WEB_DEV
237
  elif agent_name == "AI_SYSTEM_PROMPT":
238
- agent = prompts.AI_SYSTEM_PROMPT
239
  elif agent_name == "PYTHON_CODE_DEV":
240
- agent = prompts.PYTHON_CODE_DEV
241
 
242
  system_prompt = agent
243
  temperature = float(temperature)
 
22
  from utils import parse_action, parse_file_content, read_python_module_structure
23
  from datetime import datetime
24
 
25
+ # Ensure prompts are defined or imported correctly
26
+ # If prompts is a module, import it. If it's a dictionary, define it here.
27
+ # Example:
28
+ prompts = {
29
+ "WEB_DEV": "Your web development prompt here...",
30
+ "AI_SYSTEM_PROMPT": "Your AI system prompt here...",
31
+ "PYTHON_CODE_DEV": "Your Python code development prompt here..."
32
+ }
33
+
34
  now = datetime.now()
35
  date_time_str = now.strftime("%Y-%m-%d %H:%M:%S")
36
 
 
239
  prompt, history, agent_name=agents[0], sys_prompt="", temperature=0.9, max_new_tokens=256, top_p=0.95, repetition_penalty=1.7,
240
  ):
241
  seed = random.randint(1, 1111111111111111)
242
+ agent = prompts["WEB_DEV"]
243
 
244
  if agent_name == "WEB_DEV":
245
+ agent = prompts["WEB_DEV"]
246
  elif agent_name == "AI_SYSTEM_PROMPT":
247
+ agent = prompts["AI_SYSTEM_PROMPT"]
248
  elif agent_name == "PYTHON_CODE_DEV":
249
+ agent = prompts["PYTHON_CODE_DEV"]
250
 
251
  system_prompt = agent
252
  temperature = float(temperature)