mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-06-23 21:00:30 +08:00
fix(searchgraph): used shallow copy to serialize obj
This commit is contained in:
parent
24d56af97c
commit
096b665c01
2
.gitignore
vendored
2
.gitignore
vendored
@ -31,4 +31,6 @@ examples/graph_examples/ScrapeGraphAI_generated_graph
|
|||||||
examples/**/result.csv
|
examples/**/result.csv
|
||||||
examples/**/result.json
|
examples/**/result.json
|
||||||
main.py
|
main.py
|
||||||
|
*.python-version
|
||||||
|
*.lock
|
||||||
|
|
||||||
@ -10,7 +10,6 @@ authors = [
|
|||||||
{ name = "Lorenzo Padoan", email = "lorenzo.padoan977@gmail.com" }
|
{ name = "Lorenzo Padoan", email = "lorenzo.padoan977@gmail.com" }
|
||||||
]
|
]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
# python = ">=3.9, <3.12"
|
|
||||||
"langchain==0.1.15",
|
"langchain==0.1.15",
|
||||||
"langchain-openai==0.1.6",
|
"langchain-openai==0.1.6",
|
||||||
"langchain-google-genai==1.0.3",
|
"langchain-google-genai==1.0.3",
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
OmniSearchGraph Module
|
OmniSearchGraph Module
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import copy
|
||||||
|
|
||||||
from .base_graph import BaseGraph
|
from .base_graph import BaseGraph
|
||||||
from ..nodes import (
|
from ..nodes import (
|
||||||
@ -43,7 +43,7 @@ class OmniSearchGraph(AbstractGraph):
|
|||||||
def __init__(self, prompt: str, config: dict):
|
def __init__(self, prompt: str, config: dict):
|
||||||
|
|
||||||
self.max_results = config.get("max_results", 3)
|
self.max_results = config.get("max_results", 3)
|
||||||
self.copy_config = deepcopy(config)
|
self.copy_config = copy(config)
|
||||||
|
|
||||||
super().__init__(prompt, config)
|
super().__init__(prompt, config)
|
||||||
|
|
||||||
|
|||||||
@ -2,7 +2,7 @@
|
|||||||
SearchGraph Module
|
SearchGraph Module
|
||||||
"""
|
"""
|
||||||
|
|
||||||
from copy import deepcopy
|
from copy import copy
|
||||||
|
|
||||||
from .base_graph import BaseGraph
|
from .base_graph import BaseGraph
|
||||||
from ..nodes import (
|
from ..nodes import (
|
||||||
@ -42,7 +42,7 @@ class SearchGraph(AbstractGraph):
|
|||||||
def __init__(self, prompt: str, config: dict):
|
def __init__(self, prompt: str, config: dict):
|
||||||
|
|
||||||
self.max_results = config.get("max_results", 3)
|
self.max_results = config.get("max_results", 3)
|
||||||
self.copy_config = deepcopy(config)
|
self.copy_config = copy(config)
|
||||||
|
|
||||||
super().__init__(prompt, config)
|
super().__init__(prompt, config)
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user