Spaces:
Sleeping
Sleeping
Shourya Angrish commited on
Commit ·
aa853d4
1
Parent(s): 1083936
fixing typeerror
Browse files30 unmodified lines313233343536373839404142434445464748495051525354555630 unmodified linesreturn f"Here are the top 5 commands for {arg1}:\n{results}"@tooldef 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')params = {"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']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}"@tooldef get_wiki(arg1:str)-> str:30 unmodified lines31323334353637383940414243444546474849505152535455565730 unmodified linesreturn f"Here are the top 5 commands for {arg1}:\n{results}"@tooldef 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')params = {"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):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