Spaces:
Sleeping
Sleeping
Update agent.py
Browse files53 unmodified lines5455565758596074 unmodified lines13513613713853 unmodified lines# Instruction to the LLM to perform the task and use tools.# We need to build a prompt that instructs the model to use tools.prompt = f"""You are a helpful and expert AI assistant with access to a search tool.Your task is to carefully and accurately answer questions by using the search tool when necessary.Always provide a complete and correct answer based on the information you find.74 unmodified linescurrent_response += f"\n\n{new_content}\n"print(f"Model generated non-tool/non-answer content. Appending: {new_content[:100]}...")return "Agent could not complete the task within the allowed iterations. Latest response: " + new_content.strip() if new_content else "Agent could not complete the task within the allowed iterations. No meaningful content generated."53 unmodified lines5455565758596074 unmodified lines13513613713853 unmodified lines# Instruction to the LLM to perform the task and use tools.# We need to build a prompt that instructs the model to use tools.prompt = f"""You are a helpful and expert AI assistant with access to a search tool.Your task is to carefully and accurately answer questions by using the search tool when necessary.Always provide a complete and correct answer based on the information you find.74 unmodified linescurrent_response += f"\n\n{new_content}\n"print(f"Model generated non-tool/non-answer content. Appending: {new_content[:100]}...")return "Agent could not complete the task within the allowed iterations. Latest response: " + new_content.strip() if new_content else "Agent could not complete the task within the allowed iterations. No meaningful content generated."
agent.py+2-2