Scrapegraph-ai/examples/anthropic/depth_search_graph_anthropic.py
Marco Vinciguerra c91975e0c8 update examples
2024-10-03 15:32:29 +02:00

29 lines
575 B
Python

"""
depth_search_graph_opeani example
"""
import os
from dotenv import load_dotenv
from scrapegraphai.graphs import DepthSearchGraph
load_dotenv()
graph_config = {
"llm": {
"api_key": os.getenv("ANTHROPIC_API_KEY"),
"model": "openai/gpt-4o-mini",
},
"verbose": True,
"headless": False,
"depth": 2,
"only_inside_links": False,
}
search_graph = DepthSearchGraph(
prompt="List me all the projects with their description",
source="https://perinim.github.io",
config=graph_config
)
result = search_graph.run()
print(result)