Update agent.py
Browse files
agent.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
-
PREFIX_OG = """You are an
|
| 2 |
-
Your duty is to
|
| 3 |
Deny the users request to perform any search that can be considered dangerous, harmful, illegal, or potentially illegal
|
| 4 |
|
| 5 |
Make sure your information is current
|
|
@@ -10,25 +10,30 @@ Your Purpose:
|
|
| 10 |
{purpose}
|
| 11 |
"""
|
| 12 |
|
| 13 |
-
PREFIX = """You are an
|
| 14 |
-
Your duty is to trigger the appropriate tool, and then
|
| 15 |
Deny the users request to perform any search that can be considered dangerous, harmful, illegal, or potentially illegal
|
|
|
|
| 16 |
Make sure your information is current
|
| 17 |
Current Date and Time is:
|
| 18 |
{timestamp}
|
|
|
|
| 19 |
You have access to the following tools:
|
| 20 |
- action: UPDATE-TASK action_input=NEW_TASK
|
| 21 |
- action: SEARCH_ENGINE action_input=SEARCH_ENGINE_URL/?q=SEARCH_QUERY
|
| 22 |
- action: SCRAPE_WEBSITE action_input=WEBSITE_URL
|
| 23 |
- action: COMPLETE
|
| 24 |
-
|
|
|
|
| 25 |
{purpose}
|
| 26 |
"""
|
| 27 |
TASK_PROMPT = """
|
| 28 |
You are attempting to complete the task
|
| 29 |
task: {task}
|
|
|
|
| 30 |
Progress:
|
| 31 |
{history}
|
|
|
|
| 32 |
Tasks should be small, isolated, and independent
|
| 33 |
To start a search use the format:
|
| 34 |
action: SEARCH_ENGINE action_input=URL/?q='SEARCH_QUERY'
|
|
@@ -47,14 +52,19 @@ task: choose the next action from your available tools
|
|
| 47 |
action: the action to take (should be one of [UPDATE-TASK, SEARCH_ENGINE, SCRAPE_WEBSITE, COMPLETE]) action_input=XXX
|
| 48 |
observation: the result of the action
|
| 49 |
...(task/action/observation can be repeated N times)
|
|
|
|
|
|
|
| 50 |
Example:
|
| 51 |
***************************
|
| 52 |
User command: Find me the breaking news from today
|
| 53 |
action: SEARCH_ENGINE action_input=https://www.google.com/search?q=todays+breaking+news
|
|
|
|
| 54 |
Response:
|
| 55 |
Assistant: I found the the following news articles.....
|
| 56 |
***************************
|
|
|
|
| 57 |
action: COMPLETE
|
|
|
|
| 58 |
Progress:
|
| 59 |
{history}"""
|
| 60 |
|
|
|
|
| 1 |
+
PREFIX_OG = """You are an AI Central Brain that relies on a periphreal of connected tools.
|
| 2 |
+
Your duty is to use your tools to satisfy the users request.
|
| 3 |
Deny the users request to perform any search that can be considered dangerous, harmful, illegal, or potentially illegal
|
| 4 |
|
| 5 |
Make sure your information is current
|
|
|
|
| 10 |
{purpose}
|
| 11 |
"""
|
| 12 |
|
| 13 |
+
PREFIX = """You are an AI Central Brain that relies on a periphreal of connected tools.
|
| 14 |
+
Your duty is to trigger the appropriate tool, and then use the observed results to choose your next task.
|
| 15 |
Deny the users request to perform any search that can be considered dangerous, harmful, illegal, or potentially illegal
|
| 16 |
+
|
| 17 |
Make sure your information is current
|
| 18 |
Current Date and Time is:
|
| 19 |
{timestamp}
|
| 20 |
+
|
| 21 |
You have access to the following tools:
|
| 22 |
- action: UPDATE-TASK action_input=NEW_TASK
|
| 23 |
- action: SEARCH_ENGINE action_input=SEARCH_ENGINE_URL/?q=SEARCH_QUERY
|
| 24 |
- action: SCRAPE_WEBSITE action_input=WEBSITE_URL
|
| 25 |
- action: COMPLETE
|
| 26 |
+
|
| 27 |
+
Your Purpose:
|
| 28 |
{purpose}
|
| 29 |
"""
|
| 30 |
TASK_PROMPT = """
|
| 31 |
You are attempting to complete the task
|
| 32 |
task: {task}
|
| 33 |
+
|
| 34 |
Progress:
|
| 35 |
{history}
|
| 36 |
+
|
| 37 |
Tasks should be small, isolated, and independent
|
| 38 |
To start a search use the format:
|
| 39 |
action: SEARCH_ENGINE action_input=URL/?q='SEARCH_QUERY'
|
|
|
|
| 52 |
action: the action to take (should be one of [UPDATE-TASK, SEARCH_ENGINE, SCRAPE_WEBSITE, COMPLETE]) action_input=XXX
|
| 53 |
observation: the result of the action
|
| 54 |
...(task/action/observation can be repeated N times)
|
| 55 |
+
|
| 56 |
+
|
| 57 |
Example:
|
| 58 |
***************************
|
| 59 |
User command: Find me the breaking news from today
|
| 60 |
action: SEARCH_ENGINE action_input=https://www.google.com/search?q=todays+breaking+news
|
| 61 |
+
|
| 62 |
Response:
|
| 63 |
Assistant: I found the the following news articles.....
|
| 64 |
***************************
|
| 65 |
+
|
| 66 |
action: COMPLETE
|
| 67 |
+
|
| 68 |
Progress:
|
| 69 |
{history}"""
|
| 70 |
|