tonko22 commited on
Commit
6933136
·
1 Parent(s): 6740d85

Update prompts

Browse files
Files changed (2) hide show
  1. agents/single_agent.py +1 -1
  2. tools/analysis_tools.py +4 -11
agents/single_agent.py CHANGED
@@ -37,7 +37,7 @@ def create_single_agent(model):
37
  additional_authorized_imports=['numpy', 'bs4', 'rich'],
38
  max_steps=25,
39
  verbosity_level=2,
40
- description="Specialized agent for finding and extracting song lyrics specified by the user. Does not use genius.com and AZlyrics.com for scraping since they have protection mechanisms. Performs lyrics search and analysis using given tools. Provides detailed commentary with beautiful human-readable format using rich library formatting. Can format analysis results in either rich colorful output or simple text format.",
41
  prompt_templates=prompt_templates
42
  )
43
 
 
37
  additional_authorized_imports=['numpy', 'bs4', 'rich'],
38
  max_steps=25,
39
  verbosity_level=2,
40
+ description="Specialized agent for finding and extracting song lyrics specified by the user. Performs lyrics search and analysis using given tools. Provides detailed commentary with beautiful and human-readable format using rich library formatting. Format analysis results in rich colorful output.",
41
  prompt_templates=prompt_templates
42
  )
43
 
tools/analysis_tools.py CHANGED
@@ -18,12 +18,11 @@ class AnalyzeLyricsTool(Tool):
18
  inputs = {
19
  "song_title": {"type": "string", "description": "Title of the song"},
20
  "artist": {"type": "string", "description": "Name of the artist"},
21
- "lyrics": {"type": "string", "description": "Lyrics of the song"},
22
- "format_output": {"type": "boolean", "description": "Whether to format the output with rich styling", "nullable": True}
23
- }
24
  output_type = "string"
25
 
26
- def forward(self, song_title: str, artist: str, lyrics: str, format_output: bool = True) -> str:
27
  """
28
  Performs a deep analysis of the given lyrics and artist metadata.
29
 
@@ -75,12 +74,6 @@ class AnalyzeLyricsTool(Tool):
75
 
76
  # Use the function with retry mechanism
77
  logger.info("Analyzing lyrics for song: '{}' by '{}'", song_title, artist)
78
- # Get raw analysis as JSON
79
  response = make_api_call_with_retry(model_to_use, prompt)
 
80
 
81
- # Format the response if requested
82
- if format_output:
83
- formatter = FormatAnalysisResultsTool()
84
- return formatter.forward(response)
85
- else:
86
- return response
 
18
  inputs = {
19
  "song_title": {"type": "string", "description": "Title of the song"},
20
  "artist": {"type": "string", "description": "Name of the artist"},
21
+ "lyrics": {"type": "string", "description": "Lyrics of the song"}
22
+ }
 
23
  output_type = "string"
24
 
25
+ def forward(self, song_title: str, artist: str, lyrics: str) -> str:
26
  """
27
  Performs a deep analysis of the given lyrics and artist metadata.
28
 
 
74
 
75
  # Use the function with retry mechanism
76
  logger.info("Analyzing lyrics for song: '{}' by '{}'", song_title, artist)
 
77
  response = make_api_call_with_retry(model_to_use, prompt)
78
+ return response
79