Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,6 +58,11 @@ model = OpenAIServerModel(
|
|
| 58 |
# """
|
| 59 |
# )
|
| 60 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 61 |
prompt = {
|
| 62 |
'system_prompt':"""
|
| 63 |
You are a helpful assistant tasked with answering questions using a set of tools.
|
|
@@ -111,7 +116,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 111 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 112 |
class BasicAgent:
|
| 113 |
def __init__(self):
|
| 114 |
-
self.agent =
|
| 115 |
tools = [DuckDuckGoSearchTool(), WikipediaSearchTool()],
|
| 116 |
model = model,
|
| 117 |
add_base_tools=True,
|
|
|
|
| 58 |
# """
|
| 59 |
# )
|
| 60 |
|
| 61 |
+
class CustomMultiStepAgent(MultiStepAgent):
|
| 62 |
+
def initialize_system_prompt(self):
|
| 63 |
+
# Implement the method as required
|
| 64 |
+
pass
|
| 65 |
+
|
| 66 |
prompt = {
|
| 67 |
'system_prompt':"""
|
| 68 |
You are a helpful assistant tasked with answering questions using a set of tools.
|
|
|
|
| 116 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 117 |
class BasicAgent:
|
| 118 |
def __init__(self):
|
| 119 |
+
self.agent = CustomMultiStepAgent(
|
| 120 |
tools = [DuckDuckGoSearchTool(), WikipediaSearchTool()],
|
| 121 |
model = model,
|
| 122 |
add_base_tools=True,
|