Spaces:
Build error
Build error
Update app.py
Browse files9 unmodified lines101112131415161718192021222324252627282930131415162 unmodified lines1920213922232425432627289 unmodified lines# --- Constants ---DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
prompt = """You are GAIA-Bot, a fully-autonomous problem-solver.• For each question, THINK step-by-step before answering. • When outside knowledge or calculations are needed, CALL an appropriate tool. • Explain your reasoning only to yourself (in “Thought” messages); do NOT reveal it to the user. • After finishing all reasoning, RESPOND with **only** the final answer string—no pre-amble, no labels, no extra text.You have access to these tools:- gaia_file_fetch – download the file attached to the current task_id.- duckduckgo_search – look up current facts on the public web.If you require a file attached to the current task, download it with`requests_get("https://agents-course-unit4-scoring.hf.space/files/{task_id}")`and parse it inside Python.Adhere strictly to these rules:1. Use tools whenever they can reduce hallucination. 2. Never mention tool names or JSON in your final answer. 3. If you cannot find an answer, return “unknown”.Begin."""
# --- Basic Agent Definition ---# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------class BasicAgent:2 unmodified lines
search_tool = DuckDuckGoSearchTool() wiki_search = WikipediaSearchTool() prompt = ChatPromptTemplate.from_template(prompt_template)
self.agent = CodeAgent( model = model, tools=[search_tool,wiki_search], prompt=prompt,
)
app.py+2-20