Scrapegraph-ai/examples/together/depth_search_graph_together.py
Federico Aguzzi 9cd9a874f9 chore: fix example
Committing even though this is not the bug we were looking for
2024-10-18 22:35:33 +02:00

31 lines
638 B
Python

"""
depth_search_graph_opeani example
"""
import os
from dotenv import load_dotenv
from scrapegraphai.graphs import DepthSearchGraph
load_dotenv()
together_key = os.getenv("TOGETHER_APIKEY")
graph_config = {
"llm": {
"model": "togetherai/meta-llama/Meta-Llama-3.1-8B-Instruct-Turbo",
"api_key": together_key,
},
"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)