Spaces:
Runtime error
Runtime error
Update app.py
Browse filesadded @staticmethod to get_file to remove self in arguments
30 unmodified lines3132333435363720 unmodified lines58596061626364656667686930 unmodified lines)# self.google_search_tool = Tool(google_search = GoogleSearch())self.google_search_tool = GoogleSearchTool()self.agent = CodeAgent(model = self.llm_model, tools = [self.google_search_tool, self.get_file])# # Define Google API client with GoogleSearch tool# self.client = genai.Client(api_key=GEMINI_API_KEY)20 unmodified lines# return answer.text@tooldef get_file(self, task_id: str) -> IO:'''Downloads the file associated with the given task_id, if one exists and is mapped.If the question mentions an attachment, use this function.Args:self: The class instance.task_id: Id of the question.Returns:The file associated with the question.30 unmodified lines3132333435363720 unmodified lines58596061626364656667686930 unmodified lines)# self.google_search_tool = Tool(google_search = GoogleSearch())self.google_search_tool = GoogleSearchTool()self.agent = CodeAgent(model = self.llm_model, tools = [self.google_search_tool, get_file])# # Define Google API client with GoogleSearch tool# self.client = genai.Client(api_key=GEMINI_API_KEY)20 unmodified lines# return answer.text@tool@staticmethoddef get_file(task_id: str) -> IO:'''Downloads the file associated with the given task_id, if one exists and is mapped.If the question mentions an attachment, use this function.Args:task_id: Id of the question.Returns:The file associated with the question.
app.py+3-3