Skip to content

Commit a3c43c9

Browse files
🐛 Rename user_prompt parameter to prompt
This adjustment makes the class consistent with the definition of the arguments.
1 parent ff4ccb9 commit a3c43c9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scrapegraphai/builders/graph_builder.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@ class GraphBuilder:
4040
ValueError: If 'api_key' is not included in llm_config.
4141
"""
4242

43-
def __init__(self, user_prompt: str, config: dict):
43+
def __init__(self, prompt: str, config: dict):
4444
"""
4545
Initializes the GraphBuilder with a user prompt and language model configuration.
4646
"""
47-
self.user_prompt = user_prompt
47+
self.prompt = prompt
4848
self.config = config
4949
self.llm = self._create_llm(config["llm"])
5050
self.nodes_description = self._generate_nodes_description()
@@ -122,7 +122,7 @@ def build_graph(self):
122122
Returns:
123123
dict: A JSON representation of the graph configuration.
124124
"""
125-
return self.chain.invoke(self.user_prompt)
125+
return self.chain.invoke(self.prompt)
126126

127127
@staticmethod
128128
def convert_json_to_graphviz(json_data, format: str = 'pdf'):

0 commit comments

Comments
 (0)