From dedc73304755c2d540a121d143173f60fb448bbb Mon Sep 17 00:00:00 2001 From: Marco Perini Date: Mon, 13 May 2024 18:46:34 +0200 Subject: [PATCH] fix(asyncio): replaced deepcopy with copy due to serialization problems --- examples/openai/search_graph_openai.py | 2 +- scrapegraphai/nodes/graph_iterator_node.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/examples/openai/search_graph_openai.py b/examples/openai/search_graph_openai.py index ffff1cb5..7f40ebde 100644 --- a/examples/openai/search_graph_openai.py +++ b/examples/openai/search_graph_openai.py @@ -28,7 +28,7 @@ graph_config = { # ************************************************ search_graph = SearchGraph( - prompt="List me the best escursions near Trento", + prompt="List me Chioggia's famous dishes", config=graph_config ) diff --git a/scrapegraphai/nodes/graph_iterator_node.py b/scrapegraphai/nodes/graph_iterator_node.py index 4ed7ad8e..517dfe0c 100644 --- a/scrapegraphai/nodes/graph_iterator_node.py +++ b/scrapegraphai/nodes/graph_iterator_node.py @@ -11,7 +11,7 @@ from tqdm.asyncio import tqdm from .base_node import BaseNode -_default_batchsize = 4 +_default_batchsize = 2 class GraphIteratorNode(BaseNode): @@ -118,7 +118,7 @@ class GraphIteratorNode(BaseNode): # creates a deepcopy of the graph instance for each endpoint for url in urls: - instance = copy.deepcopy(graph_instance) + instance = copy.copy(graph_instance) instance.source = url participants.append(instance)