Spaces:
Runtime error
Runtime error
Update agent.py
Browse files
agent.py
CHANGED
@@ -17,7 +17,6 @@ Progress:
|
|
17 |
Tasks should be small, isolated, and independent
|
18 |
What should the task be for us to achieve the purpose?
|
19 |
task: """
|
20 |
-
"""
|
21 |
|
22 |
ACTION_PROMPT = """
|
23 |
You have access to the following tools:
|
@@ -45,8 +44,9 @@ observation: the result of the action
|
|
45 |
... (thought/action/observation can repeat 1 time)
|
46 |
... (!! Your reply should always end with thought/action !!)
|
47 |
|
48 |
-
Example
|
49 |
User Request: "Can you please explain the concept of blockchain technology?"
|
|
|
50 |
action: SEARCH action_input=https://www.google.com/search?q=blockchain technology explained
|
51 |
observation: the result of the action
|
52 |
|
@@ -55,8 +55,9 @@ Blockchain Technology Explained: Blockchain acts essentially as a decentralized
|
|
55 |
action: COMPLETE
|
56 |
|
57 |
|
58 |
-
Example
|
59 |
User Request: "How does one solve quadratic equations algebraically?"
|
|
|
60 |
action: SEARCH action_input=https://www.wolframalpha.com/input?i=algebraic solution methods for quadratic equations
|
61 |
observation: the result of the action
|
62 |
|
@@ -65,16 +66,14 @@ To Algebraically Solve Quadratic Equations: To address quadratic equations havin
|
|
65 |
action: COMPLETE
|
66 |
|
67 |
|
68 |
-
Example
|
69 |
User Request: "I am curious about German cuisine. Can you suggest some traditional dishes?"
|
70 |
action: SEARCH action_input=https://duckduckgo.com/?q=German food traditions
|
71 |
-
observation: the result of the action
|
72 |
|
73 |
Traditional Dishes within German Cuisine: Some iconic German culinary delights range from savory sausages, hearty stews, crispy breads, to delectable desserts. Amongst them, Bratwurst stands out as a classic pork-based sausage best enjoyed grilled and served in fresh rolls. Another signature dish is Sauerbraten – marinated pot roast typically prepared from beef, though horse meat versions exist too. Not forgetting pretzels (Brezeln), widely popular snacks craved nationwide. Lastly, Black Forest Cake (Schwarzwälder Kirschtorte), composed of layers of chocolate sponge cake interspersed with whipped cream and cherries, remains a legendary choice amongst decadent treats. Sample further authentic recipes courtesy of Delicious and Epicurious.
|
74 |
|
75 |
action: COMPLETE
|
76 |
|
77 |
-
|
78 |
You are attempting to complete the task
|
79 |
task: {task}
|
80 |
{history}"""
|
|
|
17 |
Tasks should be small, isolated, and independent
|
18 |
What should the task be for us to achieve the purpose?
|
19 |
task: """
|
|
|
20 |
|
21 |
ACTION_PROMPT = """
|
22 |
You have access to the following tools:
|
|
|
44 |
... (thought/action/observation can repeat 1 time)
|
45 |
... (!! Your reply should always end with thought/action !!)
|
46 |
|
47 |
+
Example Dialogue 1:
|
48 |
User Request: "Can you please explain the concept of blockchain technology?"
|
49 |
+
thought: I need to find up-to-date information. To launch an internet search, I need to reply with: action: SEARCH action_input="https://www.google.com/search?q=blockchain technology explained"
|
50 |
action: SEARCH action_input=https://www.google.com/search?q=blockchain technology explained
|
51 |
observation: the result of the action
|
52 |
|
|
|
55 |
action: COMPLETE
|
56 |
|
57 |
|
58 |
+
Example Dialogue 2:
|
59 |
User Request: "How does one solve quadratic equations algebraically?"
|
60 |
+
thought: To launch an internet search, I need to reply with: action: SEARCH action_input="https://www.wolframalpha.com/input?i=algebraic solution methods for quadratic equations"
|
61 |
action: SEARCH action_input=https://www.wolframalpha.com/input?i=algebraic solution methods for quadratic equations
|
62 |
observation: the result of the action
|
63 |
|
|
|
66 |
action: COMPLETE
|
67 |
|
68 |
|
69 |
+
Example Dialogue 3:
|
70 |
User Request: "I am curious about German cuisine. Can you suggest some traditional dishes?"
|
71 |
action: SEARCH action_input=https://duckduckgo.com/?q=German food traditions
|
|
|
72 |
|
73 |
Traditional Dishes within German Cuisine: Some iconic German culinary delights range from savory sausages, hearty stews, crispy breads, to delectable desserts. Amongst them, Bratwurst stands out as a classic pork-based sausage best enjoyed grilled and served in fresh rolls. Another signature dish is Sauerbraten – marinated pot roast typically prepared from beef, though horse meat versions exist too. Not forgetting pretzels (Brezeln), widely popular snacks craved nationwide. Lastly, Black Forest Cake (Schwarzwälder Kirschtorte), composed of layers of chocolate sponge cake interspersed with whipped cream and cherries, remains a legendary choice amongst decadent treats. Sample further authentic recipes courtesy of Delicious and Epicurious.
|
74 |
|
75 |
action: COMPLETE
|
76 |
|
|
|
77 |
You are attempting to complete the task
|
78 |
task: {task}
|
79 |
{history}"""
|