VinciGit00 / Scrapegraph-ai

Python scraper based on AI

Home Page:https://scrapegraphai.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using Gemini with SearchGraph

so-lovely opened this issue · comments

Describe the bug
`def Search_with_query(query:str):
load_dotenv()
graph_config = {
'llm': {
'api_key' : os.environ.get('GEMINI_API_KEY'),
'model' : 'gemini-1.5-pro-latest'
}
}

search_graph = SearchGraph(
    prompt=query,
    config=graph_config
)
result = search_graph.run()
return result`

My terminal:
2024-05-27 15:19:56,405 - 4596 - before_sleep.py-before_sleep:65 - WARNING: Retrying langchain_google_genai.chat_models._chat_with_retry.<locals>._chat_with_retry in 2.0 seconds as it raised ResourceExhausted: 429 Resource has been exhausted (e.g. check quota)..
It seems Gemini doesn't accept requests over the limit.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows11
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]

Additional context
Add any other context about the problem here.

429 Resource has been exhausted (e.g. check quota): it means that it depends by your billing plan
pls update it