Spaces:
Sleeping
Sleeping
Update agent.py
Browse files53 unmodified lines545556575758596074 unmodified lines13513613713813853 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""" 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 lines current_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." 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