Gary Simmons
commited on
Commit
·
10ab1df
1
Parent(s):
37d54d8
remove prompt
Browse files
app.py
CHANGED
|
@@ -221,37 +221,6 @@ class BasicAgent:
|
|
| 221 |
def __init__(self, name: str = "GGSAgent"):
|
| 222 |
self.name = name
|
| 223 |
|
| 224 |
-
# System prompt to guide the agent on handling failures
|
| 225 |
-
system_prompt = """You are a helpful AI agent that can answer questions using various tools.
|
| 226 |
-
|
| 227 |
-
IMPORTANT: When working with YouTube videos, use this fallback strategy:
|
| 228 |
-
|
| 229 |
-
1. FIRST ATTEMPT: Try get_youtube_video_info or analyze_youtube_video
|
| 230 |
-
|
| 231 |
-
2. IF NETWORK ERROR OCCURS (DNS, connection failures):
|
| 232 |
-
- DO NOT retry the same failed tool
|
| 233 |
-
- Proceed immediately to fallback strategies below
|
| 234 |
-
|
| 235 |
-
3. FALLBACK STRATEGY (in order):
|
| 236 |
-
a) Try get_youtube_noembed_info - uses alternative API
|
| 237 |
-
b) Use extract_youtube_video_id to get the video ID
|
| 238 |
-
c) Use search_youtube_video_info to get search strategy suggestions
|
| 239 |
-
d) Use web_search with queries like:
|
| 240 |
-
- "youtube [video_id] description"
|
| 241 |
-
- "youtube [video_id] reddit discussion"
|
| 242 |
-
- "youtube [video_id] content summary"
|
| 243 |
-
- "site:reddit.com [video_id]"
|
| 244 |
-
e) Use visit_webpage on relevant search results
|
| 245 |
-
|
| 246 |
-
4. FOR SPECIFIC CONTENT QUESTIONS (counting objects, identifying specific moments):
|
| 247 |
-
- Search for video transcripts, detailed reviews, or frame-by-frame analyses
|
| 248 |
-
- Look for Reddit threads, Twitter discussions, or blog posts about the video
|
| 249 |
-
- Check if there are wikis, databases, or fan sites with detailed information
|
| 250 |
-
|
| 251 |
-
5. Be persistent and creative - if one search doesn't work, try different query variations
|
| 252 |
-
|
| 253 |
-
6. Always explain your reasoning when tools fail and what alternative approach you're taking."""
|
| 254 |
-
|
| 255 |
self.code_agent = CodeAgent(
|
| 256 |
tools=[
|
| 257 |
DuckDuckGoSearchTool(),
|
|
|
|
| 221 |
def __init__(self, name: str = "GGSAgent"):
|
| 222 |
self.name = name
|
| 223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
self.code_agent = CodeAgent(
|
| 225 |
tools=[
|
| 226 |
DuckDuckGoSearchTool(),
|