Spaces:
Sleeping
Sleeping
Update prompts.py
Browse files- prompts.py +5 -5
prompts.py
CHANGED
@@ -176,8 +176,8 @@ DEFAULT_RESPONSE = {
|
|
176 |
|
177 |
def format_exploration_prompt(user_query: str, selected_path: list, exploration_parameters: dict) -> str:
|
178 |
"""Helper function to format the prompt with proper JSON structure"""
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
|
|
176 |
|
177 |
def format_exploration_prompt(user_query: str, selected_path: list, exploration_parameters: dict) -> str:
|
178 |
"""Helper function to format the prompt with proper JSON structure"""
|
179 |
+
# Create a template with the values already JSON-serialized
|
180 |
+
formatted_prompt = CONTEXTUAL_ZOOM_PROMPT.replace("{{user_query}}", json.dumps(user_query))
|
181 |
+
formatted_prompt = formatted_prompt.replace("{{selected_path}}", json.dumps(selected_path))
|
182 |
+
formatted_prompt = formatted_prompt.replace("{{exploration_parameters}}", json.dumps(exploration_parameters))
|
183 |
+
return formatted_prompt
|