broadfield-dev commited on
Commit
7e1df79
·
verified ·
1 Parent(s): a2966f7

Update prompts.py

Browse files
Files changed (1) hide show
  1. prompts.py +10 -3
prompts.py CHANGED
@@ -11,13 +11,21 @@ METRICS_SYSTEM_PROMPT = "You are a precise JSON output agent. Output a single JS
11
  TOOL_SYSTEM_PROMPT = """You are a precise routing agent. Your task is to select the most appropriate action to respond to a user's query and provide the required inputs as a single JSON object.
12
 
13
  Available Actions and their inputs:
14
- - "create_huggingface_space": Creates a new HF space. Requires: "owner", "space_name", "sdk", and a "description" of the app to be built.
15
- - "update_huggingface_space_file": Updates a file in an existing HF space. Requires: "owner", "space_name", "file_path", "new_content", and a "commit_message".
 
 
16
  - "search_duckduckgo_and_report": Searches the web. Requires: "search_engine_query".
17
  - "scrape_url_and_report": Scrapes a single URL. Requires: "url".
18
  - "answer_using_conversation_memory": Answers from memory.
19
  - "quick_respond": For simple conversation.
20
 
 
 
 
 
 
 
21
  Example for creating a space:
22
  {"action": "create_huggingface_space", "action_input": {"owner": "test-user", "space_name": "my-translator-app", "sdk": "gradio", "description": "a simple Gradio app that translates english text to french text"}}
23
 
@@ -65,7 +73,6 @@ Project Details:
65
  Ensure the output is a single, complete, and functional project definition ready to be used.
66
  """
67
 
68
-
69
  def get_metrics_user_prompt(user_input: str, bot_response: str) -> str:
70
  return f"User: \"{user_input}\"\nAI: \"{bot_response}\"\nMetrics: \"takeaway\" (3-7 words), \"response_success_score\" (0.0-1.0), \"future_confidence_score\" (0.0-1.0). Output JSON ONLY."
71
 
 
11
  TOOL_SYSTEM_PROMPT = """You are a precise routing agent. Your task is to select the most appropriate action to respond to a user's query and provide the required inputs as a single JSON object.
12
 
13
  Available Actions and their inputs:
14
+ - "create_huggingface_space": Creates a new HF space. Requires: "owner", "space_name", "sdk", "description".
15
+ - "list_space_files": Lists all files in an existing HF space. Requires: "owner", "space_name".
16
+ - "get_space_file_content": Retrieves the content of a specific file in a space. Requires: "owner", "space_name", "file_path".
17
+ - "update_huggingface_space_file": Updates a file in an existing HF space. Requires: "owner", "space_name", "file_path", "new_content", "commit_message".
18
  - "search_duckduckgo_and_report": Searches the web. Requires: "search_engine_query".
19
  - "scrape_url_and_report": Scrapes a single URL. Requires: "url".
20
  - "answer_using_conversation_memory": Answers from memory.
21
  - "quick_respond": For simple conversation.
22
 
23
+ Example for listing files:
24
+ {"action": "list_space_files", "action_input": {"owner": "test-user", "space_name": "my-app"}}
25
+
26
+ Example for reading a file:
27
+ {"action": "get_space_file_content", "action_input": {"owner": "test-user", "space_name": "my-app", "file_path": "app.py"}}
28
+
29
  Example for creating a space:
30
  {"action": "create_huggingface_space", "action_input": {"owner": "test-user", "space_name": "my-translator-app", "sdk": "gradio", "description": "a simple Gradio app that translates english text to french text"}}
31
 
 
73
  Ensure the output is a single, complete, and functional project definition ready to be used.
74
  """
75
 
 
76
  def get_metrics_user_prompt(user_input: str, bot_response: str) -> str:
77
  return f"User: \"{user_input}\"\nAI: \"{bot_response}\"\nMetrics: \"takeaway\" (3-7 words), \"response_success_score\" (0.0-1.0), \"future_confidence_score\" (0.0-1.0). Output JSON ONLY."
78