Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gemini depends on timeout to reply. #265

Closed
wrench1997 opened this issue May 18, 2024 · 0 comments
Closed

Gemini depends on timeout to reply. #265

wrench1997 opened this issue May 18, 2024 · 0 comments

Comments

@wrench1997
Copy link

wrench1997 commented May 18, 2024

Describe the bug
I generated a free Gemini key and found that its use was restricted, but I could obtain the information using the example given on the official website.

example

from scrapegraphai.graphs import SmartScraperGraph
from scrapegraphai.nodes import FetchNode
# fetcher = FetchNode(
#     node_config={
#         "headless": False,
#         "endpoint": "http://192.168.166.8:7890",
#     }
# )
GOOGLE_APIKEY = "xxxxxxxxxxxxxxxxxxxxxxxxx"

# Define the configuration for the graph
graph_config = {
    "llm": {
        "api_key": GOOGLE_APIKEY,
        "model": "gemini-pro",
    },
}

# Create the SmartScraperGraph instance
smart_scraper_graph = SmartScraperGraph(
    prompt="提取并列出新闻标题,与简单概述一下内容",
    source="https://news.163.com/",
    config=graph_config
)

result = smart_scraper_graph.run()
print(result)

Screenshots
QQ截图20240519021049

Version 1.2.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant