MegaTronX commited on
Commit
ae71994
·
verified ·
1 Parent(s): 2925570

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -47,14 +47,18 @@ def process_and_package(ai_response: str):
47
  agent = LlamaCppAgent(
48
  provider,
49
  system_prompt=(
50
- "You are a code parsing assistant. The user will paste AI output referencing multiple code files. "
51
- "Return a JSON object mapping each filename to its full source code text. "
52
- "Do not return anything else."
 
 
 
53
  ),
54
  predefined_messages_formatter_type=MessagesFormatterType.GEMMA_2,
55
  debug_output=True
56
  )
57
 
 
58
  # Call the agent
59
  # Use get_chat_response (not run)
60
  try:
 
47
  agent = LlamaCppAgent(
48
  provider,
49
  system_prompt=(
50
+ "You are a code packager. The user will paste text that may contain multiple code blocks. "
51
+ "Extract all code blocks, associate each with a filename if available, and return a JSON object "
52
+ "where keys are filenames and values are the full content. "
53
+ "ONLY return a raw JSON object — no explanations, no markdown, no text outside the JSON. "
54
+ "Example:\n\n"
55
+ "{\n \"app.py\": \"import gradio as gr\\n...\",\n \"utils.py\": \"def helper():\\n...\"\n}\n"
56
  ),
57
  predefined_messages_formatter_type=MessagesFormatterType.GEMMA_2,
58
  debug_output=True
59
  )
60
 
61
+
62
  # Call the agent
63
  # Use get_chat_response (not run)
64
  try: