Skip to content

Commit

Permalink
Add param query and location in extract_multiple_jobs function
Browse files Browse the repository at this point in the history
fix aniket-work#1 agent error with log:
```
I encountered an error while trying to use the tool. This was the error: JobScrapeQueryRun.extract_multiple_jobs() takes 1 positional argument but 3 were given.
```
  • Loading branch information
hakimrie committed Jun 27, 2024
1 parent b567e6e commit b3d575e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions custom_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ def scrape_google_jobs_listing(self, job_ids): # Add self as the first argument

return data

def extract_multiple_jobs(self): # Add self as the first argument
def extract_multiple_jobs(self, query: str, location: str): # Add self as the first argument
params = {
'api_key': self.api_key,
'engine': 'google_jobs',
'gl': 'us',
'hl': 'en',
'q': 'barista new york',
'q': query,
'location': location,
}

search = GoogleSearch(params)
Expand Down

0 comments on commit b3d575e

Please sign in to comment.