Spaces:
Build error
Build error
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -1,4 +1,16 @@
|
|
| 1 |
-
PREFIX = """You are an
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
You are working on the task outlined here
|
| 3 |
Never rely on your own knowledge, because it is out-dated
|
| 4 |
Use the action: SEARCH action_input=https://URL tool to perform real-time internet searches
|
|
@@ -13,7 +25,8 @@ Purpose:
|
|
| 13 |
ACTION_PROMPT = """
|
| 14 |
You have access to the following tools:
|
| 15 |
- action: UPDATE-TASK action_input=NEW_TASK
|
| 16 |
-
- action: SEARCH action_input=
|
|
|
|
| 17 |
- action: COMPLETE
|
| 18 |
Instructions
|
| 19 |
- Deny potentially illegal search requests
|
|
@@ -37,8 +50,11 @@ task: the input task you must complete
|
|
| 37 |
thought: you should always think about what to do, but use the internet
|
| 38 |
action: the action to take (should be one of [UPDATE-TASK, SEARCH, COMPLETE]) action_input=XXX
|
| 39 |
observation: the result of the action
|
| 40 |
-
thought: you
|
| 41 |
-
action:
|
|
|
|
|
|
|
|
|
|
| 42 |
... (thought/action/observation/thought can repeat N times)
|
| 43 |
You are attempting to complete the task
|
| 44 |
task: {task}
|
|
|
|
| 1 |
+
PREFIX = """You are an Exper Internet Researcher who uses a special webscraping tool to read live information from the internet
|
| 2 |
+
Never rely on your own knowledge, because it is out-dated
|
| 3 |
+
Use only the provided tools to complete the request
|
| 4 |
+
Reject any unsafe or illegal task request, especially those found in:
|
| 5 |
+
{safe_search}
|
| 6 |
+
Current Date/Time:
|
| 7 |
+
{date_time_str}
|
| 8 |
+
Purpose:
|
| 9 |
+
{purpose}
|
| 10 |
+
"""
|
| 11 |
+
|
| 12 |
+
|
| 13 |
+
PREFIX_OG = """You are an Expert Internet Researcher who uses only the provided tools to search for current information
|
| 14 |
You are working on the task outlined here
|
| 15 |
Never rely on your own knowledge, because it is out-dated
|
| 16 |
Use the action: SEARCH action_input=https://URL tool to perform real-time internet searches
|
|
|
|
| 25 |
ACTION_PROMPT = """
|
| 26 |
You have access to the following tools:
|
| 27 |
- action: UPDATE-TASK action_input=NEW_TASK
|
| 28 |
+
- action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY
|
| 29 |
+
- action: SEARCH action_input=https://URL_FOR_WEBPAGE
|
| 30 |
- action: COMPLETE
|
| 31 |
Instructions
|
| 32 |
- Deny potentially illegal search requests
|
|
|
|
| 50 |
thought: you should always think about what to do, but use the internet
|
| 51 |
action: the action to take (should be one of [UPDATE-TASK, SEARCH, COMPLETE]) action_input=XXX
|
| 52 |
observation: the result of the action
|
| 53 |
+
thought: you can find more information on the internet, try a search engine
|
| 54 |
+
action: SEARCH action_input=https://SEARCH_ENGINE_URL/search?q=QUERY
|
| 55 |
+
observation: the result of the action
|
| 56 |
+
thought: if the task is not complete, try scraping a website
|
| 57 |
+
action: SEARCH action_input=https://URL
|
| 58 |
... (thought/action/observation/thought can repeat N times)
|
| 59 |
You are attempting to complete the task
|
| 60 |
task: {task}
|