Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,11 @@ model = OpenAIServerModel(
|
|
| 14 |
api_base="https://generativelanguage.googleapis.com/v1beta/openai/"
|
| 15 |
)
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
prompt = PromptTemplates(
|
| 18 |
system_prompt="""
|
| 19 |
You are a helpful assistant tasked with answering questions using a set of tools.
|
|
@@ -66,7 +71,7 @@ DEFAULT_API_URL = "https://agents-course-unit4-scoring.hf.space"
|
|
| 66 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 67 |
class BasicAgent:
|
| 68 |
def __init__(self):
|
| 69 |
-
self.agent =
|
| 70 |
tools = [DuckDuckGoSearchTool(), WikipediaSearchTool()],
|
| 71 |
model = model,
|
| 72 |
add_base_tools=True,
|
|
|
|
| 14 |
api_base="https://generativelanguage.googleapis.com/v1beta/openai/"
|
| 15 |
)
|
| 16 |
|
| 17 |
+
class CustomMultiStepAgent(MultiStepAgent):
|
| 18 |
+
def initialize_system_prompt(self):
|
| 19 |
+
# Implement the method as required
|
| 20 |
+
pass
|
| 21 |
+
|
| 22 |
prompt = PromptTemplates(
|
| 23 |
system_prompt="""
|
| 24 |
You are a helpful assistant tasked with answering questions using a set of tools.
|
|
|
|
| 71 |
# ----- THIS IS WERE YOU CAN BUILD WHAT YOU WANT ------
|
| 72 |
class BasicAgent:
|
| 73 |
def __init__(self):
|
| 74 |
+
self.agent = CustomMultiStepAgent(
|
| 75 |
tools = [DuckDuckGoSearchTool(), WikipediaSearchTool()],
|
| 76 |
model = model,
|
| 77 |
add_base_tools=True,
|