mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-06-28 21:01:55 +08:00
Merge pull request #658 from shenghongtw/docs/Updated_the_graph_config_in_the_documentation
problem
This commit is contained in:
commit
ca31bd9412
@ -133,7 +133,7 @@ from scrapegraphai.graphs import SpeechGraph
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"tts_model": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
|
||||
@ -133,7 +133,7 @@ from scrapegraphai.graphs import SpeechGraph
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"tts_model": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
|
||||
@ -132,7 +132,7 @@ from scrapegraphai.graphs import SpeechGraph
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"tts_model": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
|
||||
@ -138,7 +138,7 @@ from scrapegraphai.graphs import SpeechGraph
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"tts_model": {
|
||||
"api_key": "OPENAI_API_KEY",
|
||||
|
||||
@ -22,7 +22,7 @@ OpenAI models
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"library": "beautifoulsoup"
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4-turbo-2024-04-09",
|
||||
"model": "openai/gpt-4-turbo-2024-04-09",
|
||||
},
|
||||
"library": "beautifoulsoup"
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4-turbo",
|
||||
"model": "openai/gpt-4-turbo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -21,7 +21,7 @@ prompt = "Some more info"
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"additional_info": prompt,
|
||||
"verbose": True,
|
||||
|
||||
@ -15,7 +15,7 @@ from scrapegraphai.utils import prettify_exec_info
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": "s",
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"cut": False,
|
||||
"verbose": True,
|
||||
|
||||
@ -13,7 +13,7 @@ from scrapegraphai.utils import prettify_exec_info
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": "API_KEY",
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"loader_kwargs": {
|
||||
"proxy" : {
|
||||
|
||||
@ -19,7 +19,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"caching": True
|
||||
}
|
||||
|
||||
@ -23,7 +23,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"max_results": 2,
|
||||
"verbose": True,
|
||||
|
||||
@ -32,7 +32,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key":openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -13,7 +13,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ openai_key = os.getenv("OPENAI_APIKEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -28,7 +28,7 @@ openai_key = os.getenv("ONEAPI_KEY")
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": openai_key,
|
||||
"model": "gpt-3.5-turbo",
|
||||
"model": "openai/gpt-3.5-turbo",
|
||||
},
|
||||
"verbose":False,
|
||||
}
|
||||
|
||||
@ -18,7 +18,7 @@ load_dotenv()
|
||||
graph_config = {
|
||||
"llm": {
|
||||
"api_key": os.getenv("OPENAI_API_KEY"),
|
||||
"model": "gpt-4o",
|
||||
"model": "openai/gpt-4o",
|
||||
},
|
||||
"verbose": True,
|
||||
"headless": False,
|
||||
|
||||
@ -40,7 +40,7 @@ class AbstractGraph(ABC):
|
||||
... return graph
|
||||
...
|
||||
>>> my_graph = MyGraph("Example Graph",
|
||||
{"llm": {"model": "gpt-3.5-turbo"}}, "example_source")
|
||||
{"llm": {"model": "openai/gpt-3.5-turbo"}}, "example_source")
|
||||
>>> result = my_graph.run()
|
||||
"""
|
||||
|
||||
|
||||
@ -36,7 +36,7 @@ class CSVScraperMultiGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> search_graph = MultipleSearchGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
@ -46,7 +46,7 @@ class DeepScraperGraph(AbstractGraph):
|
||||
>>> deep_scraper = DeepScraperGraph(
|
||||
... "List me all the job titles and detailed job description.",
|
||||
... "https://www.google.com/about/careers/applications/jobs/results/?location=Bangalore%20India",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = deep_scraper.run()
|
||||
)
|
||||
|
||||
@ -35,7 +35,7 @@ class JSONScraperGraph(AbstractGraph):
|
||||
>>> json_scraper = JSONScraperGraph(
|
||||
... "List me all the attractions in Chioggia.",
|
||||
... "data/chioggia.json",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = json_scraper.run()
|
||||
"""
|
||||
|
||||
@ -37,7 +37,7 @@ class JSONScraperMultiGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> search_graph = MultipleSearchGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
@ -35,7 +35,7 @@ class MDScraperGraph(AbstractGraph):
|
||||
>>> smart_scraper = MDScraperGraph(
|
||||
... "List me all the attractions in Chioggia.",
|
||||
... "https://en.wikipedia.org/wiki/Chioggia",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = smart_scraper.run()
|
||||
"""
|
||||
|
||||
@ -36,7 +36,7 @@ class MDScraperMultiGraph(AbstractGraph):
|
||||
>>> search_graph = MDScraperMultiGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... ["http://example.com/page1", "http://example.com/page2"],
|
||||
... {"llm_model": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm_model": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
@ -42,7 +42,7 @@ class OmniScraperGraph(AbstractGraph):
|
||||
>>> omni_scraper = OmniScraperGraph(
|
||||
... "List me all the attractions in Chioggia and describe their pictures.",
|
||||
... "https://en.wikipedia.org/wiki/Chioggia",
|
||||
... {"llm": {"model": "gpt-4o"}}
|
||||
... {"llm": {"model": "openai/gpt-4o"}}
|
||||
... )
|
||||
>>> result = omni_scraper.run()
|
||||
)
|
||||
|
||||
@ -38,7 +38,7 @@ class OmniSearchGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> omni_search_graph = OmniSearchGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-4o"}}
|
||||
... {"llm": {"model": "openai/gpt-4o"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
@ -39,7 +39,7 @@ class PDFScraperGraph(AbstractGraph):
|
||||
>>> pdf_scraper = PDFScraperGraph(
|
||||
... "List me all the attractions in Chioggia.",
|
||||
... "data/chioggia.pdf",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = pdf_scraper.run()
|
||||
"""
|
||||
|
||||
@ -37,7 +37,7 @@ class PdfScraperMultiGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> search_graph = MultipleSearchGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
@ -38,7 +38,7 @@ class ScriptCreatorGraph(AbstractGraph):
|
||||
>>> script_creator = ScriptCreatorGraph(
|
||||
... "List me all the attractions in Chioggia.",
|
||||
... "https://en.wikipedia.org/wiki/Chioggia",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = script_creator.run()
|
||||
"""
|
||||
|
||||
@ -34,7 +34,7 @@ class ScriptCreatorMultiGraph(AbstractGraph):
|
||||
>>> script_graph = ScriptCreatorMultiGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... source=[],
|
||||
... config={"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... config={"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... schema={}
|
||||
... )
|
||||
>>> result = script_graph.run()
|
||||
|
||||
@ -39,7 +39,7 @@ class SearchGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> search_graph = SearchGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
>>> print(search_graph.get_considered_urls())
|
||||
|
||||
@ -34,7 +34,7 @@ class SearchLinkGraph(AbstractGraph):
|
||||
>>> smart_scraper = SearchLinkGraph(
|
||||
... "List me all the attractions in Chioggia.",
|
||||
... "https://en.wikipedia.org/wiki/Chioggia",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = smart_scraper.run()
|
||||
"""
|
||||
|
||||
@ -39,7 +39,7 @@ class SmartScraperGraph(AbstractGraph):
|
||||
>>> smart_scraper = SmartScraperGraph(
|
||||
... "List me all the attractions in Chioggia.",
|
||||
... "https://en.wikipedia.org/wiki/Chioggia",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = smart_scraper.run()
|
||||
)
|
||||
|
||||
@ -39,7 +39,7 @@ class SmartScraperMultiConcatGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> search_graph = SmartScraperMultiConcatGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
@ -37,7 +37,7 @@ class SmartScraperMultiGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> search_graph = MultipleSearchGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
@ -41,7 +41,7 @@ class SpeechGraph(AbstractGraph):
|
||||
>>> speech_graph = SpeechGraph(
|
||||
... "List me all the attractions in Chioggia and generate an audio summary.",
|
||||
... "https://en.wikipedia.org/wiki/Chioggia",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
"""
|
||||
|
||||
def __init__(self, prompt: str, source: str, config: dict, schema: Optional[BaseModel] = None):
|
||||
|
||||
@ -38,7 +38,7 @@ class XMLScraperGraph(AbstractGraph):
|
||||
>>> xml_scraper = XMLScraperGraph(
|
||||
... "List me all the attractions in Chioggia.",
|
||||
... "data/chioggia.xml",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = xml_scraper.run()
|
||||
"""
|
||||
|
||||
@ -37,7 +37,7 @@ class XMLScraperMultiGraph(AbstractGraph):
|
||||
Example:
|
||||
>>> search_graph = MultipleSearchGraph(
|
||||
... "What is Chioggia famous for?",
|
||||
... {"llm": {"model": "gpt-3.5-turbo"}}
|
||||
... {"llm": {"model": "openai/gpt-3.5-turbo"}}
|
||||
... )
|
||||
>>> result = search_graph.run()
|
||||
"""
|
||||
|
||||
Loading…
Reference in New Issue
Block a user