Spaces:
Sleeping
Sleeping
Shourya Angrish commited on
Commit ·
aa853d4
1
Parent(s): 1083936
fixing typeerror
Browse files30 unmodified lines313233343435363738394040414243444542434445464748495051525253535455565730 unmodified lines return f"Here are the top 5 commands for {arg1}:\n{results}"
@tool def get_jobs(args1:str,args2:str)-> str:def get_jobs(args1: str, args2: str) -> str: """A tool that fetches the jobs from a given location. Args: args1: the job title. args2: the location. """ api= os.getenv('api_key') api = os.getenv('api_key') params = { "engine": "google_jobs", "q": f"{args1} jobs in {args2}", "hl": "en", "api_key": api "engine": "google_jobs", "q": f"{args1} jobs in {args2}", "hl": "en", "api_key": api }
search = GoogleSearch(params) results = search.get_dict() jobs = results['jobs_results'] job_list = "" for i in range(5): jobs = jobs + f"{i+1}. {results['jobs_results'][i]['apply_options']}\n" return f"Here are the top 5 {args1} jobs in {args2}:\n{jobs}" job_list += f"{i+1}. {jobs[i]['apply_options']}\n" return f"Here are the top 5 {args1} jobs in {args2}:\n{job_list}"
@tooldef get_wiki(arg1:str)-> str:app.py+9-8