Skip to content

Commit 8bd8fb0

Browse files
committed
refactoring of examples
1 parent 5cb5fbf commit 8bd8fb0

File tree

7 files changed

+1
-84
lines changed

7 files changed

+1
-84
lines changed

examples/anthropic/search_graph_schema_haiku.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
load_dotenv()
88

99
from scrapegraphai.graphs import SearchGraph
10-
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
1110

1211
from pydantic import BaseModel, Field
1312
from typing import List
@@ -45,14 +44,3 @@ class Dishes(BaseModel):
4544

4645
result = search_graph.run()
4746
print(result)
48-
49-
# ************************************************
50-
# Get graph execution info
51-
# ************************************************
52-
53-
graph_exec_info = search_graph.get_execution_info()
54-
print(prettify_exec_info(graph_exec_info))
55-
56-
# Save to json and csv
57-
convert_to_csv(result, "result")
58-
convert_to_json(result, "result")

examples/bedrock/search_graph_bedrock.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from dotenv import load_dotenv
66
from scrapegraphai.graphs import SearchGraph
7-
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
87

98
load_dotenv()
109

@@ -33,14 +32,3 @@
3332

3433
result = search_graph.run()
3534
print(result)
36-
37-
# ************************************************
38-
# Get graph execution info
39-
# ************************************************
40-
41-
graph_exec_info = search_graph.get_execution_info()
42-
print(prettify_exec_info(graph_exec_info))
43-
44-
# Save to json and csv
45-
convert_to_csv(result, "result")
46-
convert_to_json(result, "result")

examples/deepseek/search_graph_deepseek.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
from dotenv import load_dotenv
77
from scrapegraphai.graphs import SearchGraph
8-
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
98
load_dotenv()
109

1110
# ************************************************
@@ -40,14 +39,3 @@
4039

4140
result = search_graph.run()
4241
print(result)
43-
44-
# ************************************************
45-
# Get graph execution info
46-
# ************************************************
47-
48-
graph_exec_info = search_graph.get_execution_info()
49-
print(prettify_exec_info(graph_exec_info))
50-
51-
# Save to json and csv
52-
convert_to_csv(result, "result")
53-
convert_to_json(result, "result")

examples/ernie/search_graph_ernie.py

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import os
66
from dotenv import load_dotenv
77
from scrapegraphai.graphs import SearchGraph
8-
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
8+
99
load_dotenv()
1010

1111
# ************************************************
@@ -34,14 +34,3 @@
3434

3535
result = search_graph.run()
3636
print(result)
37-
38-
# ************************************************
39-
# Get graph execution info
40-
# ************************************************
41-
42-
graph_exec_info = search_graph.get_execution_info()
43-
print(prettify_exec_info(graph_exec_info))
44-
45-
# Save to json and csv
46-
convert_to_csv(result, "result")
47-
convert_to_json(result, "result")

examples/fireworks/search_graph_fireworks.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
from dotenv import load_dotenv
77
from scrapegraphai.graphs import SearchGraph
8-
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
98

109
load_dotenv()
1110

@@ -43,14 +42,3 @@
4342

4443
result = search_graph.run()
4544
print(result)
46-
47-
# ************************************************
48-
# Get graph execution info
49-
# ************************************************
50-
51-
graph_exec_info = search_graph.get_execution_info()
52-
print(prettify_exec_info(graph_exec_info))
53-
54-
# Save to json and csv
55-
convert_to_csv(result, "result")
56-
convert_to_json(result, "result")

examples/oneapi/search_graph_oneapi.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
"""
44

55
from scrapegraphai.graphs import SearchGraph
6-
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
76

87
# ************************************************
98
# Define the configuration for the graph
@@ -29,14 +28,3 @@
2928

3029
result = search_graph.run()
3130
print(result)
32-
33-
# ************************************************
34-
# Get graph execution info
35-
# ************************************************
36-
37-
graph_exec_info = search_graph.get_execution_info()
38-
print(prettify_exec_info(graph_exec_info))
39-
40-
# Save to json and csv
41-
convert_to_csv(result, "result")
42-
convert_to_json(result, "result")

examples/openai/search_graph_openai.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import os
66
from dotenv import load_dotenv
77
from scrapegraphai.graphs import SearchGraph
8-
from scrapegraphai.utils import convert_to_csv, convert_to_json, prettify_exec_info
98
load_dotenv()
109

1110
# ************************************************
@@ -34,14 +33,3 @@
3433

3534
result = search_graph.run()
3635
print(result)
37-
38-
# ************************************************
39-
# Get graph execution info
40-
# ************************************************
41-
42-
graph_exec_info = search_graph.get_execution_info()
43-
print(prettify_exec_info(graph_exec_info))
44-
45-
# Save to json and csv
46-
convert_to_csv(result, "result")
47-
convert_to_json(result, "result")

0 commit comments

Comments
 (0)