ka2021vin commited on
Commit
19a62ce
·
verified ·
1 Parent(s): d85d39f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -36,13 +36,13 @@ def get_stock_information(stock:str) -> str:
36
  except Exception as e:
37
  return f"Error fetching stock info '{stock}': {str(e)}"
38
 
39
- @tool
40
- def get_radio_station(input_cr : str) -> list:
41
  """ This tool provide radio stream links input_cr (coutry) specified
42
  Args:
43
  input_cr (str) :A string representing name of a country/region, this is represented as a 2 letter abbreviation (input_cr='us' or input_cr='in')
44
  """
45
- try:
46
  conn = http.client.HTTPSConnection("50k-radio-stations.p.rapidapi.com")
47
 
48
  headers = {
@@ -76,7 +76,7 @@ def get_current_time_in_timezone(timezone: str) -> str:
76
  return f"The current local time in {timezone} is: {local_time}"
77
  except Exception as e:
78
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
79
-
80
 
81
  final_answer = FinalAnswerTool()
82
 
@@ -99,7 +99,7 @@ with open("prompts.yaml", 'r') as stream:
99
 
100
  agent = CodeAgent(
101
  model=model,
102
- tools=[final_answer,get_current_time_in_timezone,get_stock_information,get_radio_station], ## add your tools here (don't remove final answer)
103
  max_steps=6,
104
  verbosity_level=1,
105
  grammar=None,
 
36
  except Exception as e:
37
  return f"Error fetching stock info '{stock}': {str(e)}"
38
 
39
+ #@tool
40
+ #def get_radio_station(input_cr : str) -> list:
41
  """ This tool provide radio stream links input_cr (coutry) specified
42
  Args:
43
  input_cr (str) :A string representing name of a country/region, this is represented as a 2 letter abbreviation (input_cr='us' or input_cr='in')
44
  """
45
+ ''' try:
46
  conn = http.client.HTTPSConnection("50k-radio-stations.p.rapidapi.com")
47
 
48
  headers = {
 
76
  return f"The current local time in {timezone} is: {local_time}"
77
  except Exception as e:
78
  return f"Error fetching time for timezone '{timezone}': {str(e)}"
79
+ '''
80
 
81
  final_answer = FinalAnswerTool()
82
 
 
99
 
100
  agent = CodeAgent(
101
  model=model,
102
+ tools=[final_answer,get_stock_information], ## add your tools here (don't remove final answer)
103
  max_steps=6,
104
  verbosity_level=1,
105
  grammar=None,