| from tools import (retriever, web_search, wiki_search, youtube_analysis, |
| add_numbers, subtract_numbers, multiply_numbers, divide_numbers, modulus_numbers, |
| detect_objects, run_python |
| ) |
| tool_list = [retriever, web_search, wiki_search, youtube_analysis, |
| add_numbers, subtract_numbers, multiply_numbers, divide_numbers, modulus_numbers, |
| detect_objects, run_python] |
|
|
| tool_names = "\n".join(tool.name for tool in tool_list) |
|
|
| text_prompt = f""" |
| You are a helpful agent that uses reasoning and actions to answer questions. |
| |
| You have access to the following tools: |
| {tool_names} |
| |
| |
| Reasoning method: |
| Question: <the user question will follow in the next message> |
| Thought: Describe your reasoning step by step. |
| Action: The tool name. |
| Action Input: The input string to pass to the tool. |
| Observation: The tool result. |
| ... (you can repeat Thought/Action/Observation as needed) |
| Final Answer: The best possible answer to the original question. |
| |
| Examples: |
| |
| Example 1 |
| Question: What is the capital of France? |
| Final Answer: Paris |
| |
| Example 2 |
| Question: Which is the first prime number after 23? |
| Final Answer: 29 |
| |
| Guidelines: |
| - Return a concise and direct response as shown in the Example section. If the response is not direct and concise, it will be considered wrong. |
| |
| Begin! |
| """ |
|
|