Thanh Vinh Vo commited on
Commit
ec56f03
·
1 Parent(s): c98ec08
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -127,12 +127,12 @@ def audio_to_text(file_path: str) -> str:
127
  @tool
128
  def get_file(question_id: str, file_name: str) -> str:
129
  """
130
- A tool that downloads a file that was mentioned in a question.
131
  Args:
132
  question_id: Question ID.
133
  file_name: File name.
134
  Returns:
135
- str: Local file path where the text was saved.
136
  """
137
  import requests
138
  import os
@@ -216,7 +216,7 @@ class BasicAgent:
216
 
217
  self.manager_agent = CodeAgent(
218
  model=InferenceClientModel(
219
- model_id="deepseek-ai/DeepSeek-R1",
220
  ),
221
  tools=[get_file, audio_to_text],
222
  managed_agents=[
@@ -243,10 +243,10 @@ class BasicAgent:
243
 
244
  def __call__(self, question: str, question_id: str, file_name: str) -> str:
245
  print(f"Agent received question: {question}")
246
- file = f"Mentioned file: {file_name}" if file_name else ""
247
  prompt = f"""
248
  Answer the following question (question_id is {question_id}):):
249
- "{question}""{file}"
250
  Follow below rules when possible:
251
  1. Please take the question literally! Do not add any additional information or assumptions.
252
  2. Please answer as concisely as possible.
 
127
  @tool
128
  def get_file(question_id: str, file_name: str) -> str:
129
  """
130
+ A tool that downloads data file that was mentioned in a question and store it as local file.
131
  Args:
132
  question_id: Question ID.
133
  file_name: File name.
134
  Returns:
135
+ str: Local file path where the file was stored.
136
  """
137
  import requests
138
  import os
 
216
 
217
  self.manager_agent = CodeAgent(
218
  model=InferenceClientModel(
219
+ model_id="Qwen/Qwen2.5-Coder-32B-Instruct",
220
  ),
221
  tools=[get_file, audio_to_text],
222
  managed_agents=[
 
243
 
244
  def __call__(self, question: str, question_id: str, file_name: str) -> str:
245
  print(f"Agent received question: {question}")
246
+ file = f"Provided data file: {file_name}" if file_name else ""
247
  prompt = f"""
248
  Answer the following question (question_id is {question_id}):):
249
+ "{question}" {file}
250
  Follow below rules when possible:
251
  1. Please take the question literally! Do not add any additional information or assumptions.
252
  2. Please answer as concisely as possible.