prithivMLmods commited on
Commit
cdb6c59
·
verified ·
1 Parent(s): 6d8a748

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -17
app.py CHANGED
@@ -191,25 +191,15 @@ ragent_client = OpenAI(
191
  api_key=ACCESS_TOKEN,
192
  )
193
 
194
- SYSTEM_PROMPT = """You are an expert assistant who can solve any task using code blobs. You will be given a task to solve as best you can.
195
 
196
- To do so, you must follow a structured reasoning process in a cycle of:
 
 
 
 
 
197
 
198
- 1. **Thought:**
199
- - Analyze the problem and explain your reasoning.
200
- - Identify any necessary tools or techniques.
201
-
202
- 2. **Code:**
203
- - Implement the solution using Python.
204
- - Enclose the code block with `<end_code>`.
205
-
206
- 3. **Observation:**
207
- - Explain the output and verify correctness.
208
-
209
- 4. **Final Answer:**
210
- - Summarize the solution clearly.
211
-
212
- Always adhere to the **Thought → Code → Observation → Final Answer** structure.
213
  """
214
 
215
  def ragent_reasoning(prompt: str, history: list[dict], max_tokens: int = 512, temperature: float = 0.7, top_p: float = 0.95):
 
191
  api_key=ACCESS_TOKEN,
192
  )
193
 
194
+ SYSTEM_PROMPT = """
195
 
196
+ "You are an expert assistant who solves tasks using Python code. Follow these steps:\n"
197
+ "1. **Thought**: Explain your reasoning and plan for solving the task.\n"
198
+ "2. **Code**: Write Python code to implement your solution.\n"
199
+ "3. **Observation**: Analyze the output of the code and summarize the results.\n"
200
+ "4. **Final Answer**: Provide a concise conclusion or final result.\n\n"
201
+ f"Task: {task}"
202
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
203
  """
204
 
205
  def ragent_reasoning(prompt: str, history: list[dict], max_tokens: int = 512, temperature: float = 0.7, top_p: float = 0.95):