Skip to content

Commit f3cbbce

Browse files
authored
Merge pull request #412 from oviniciusfeitosa/patch-1
🐛 Rename user_prompt parameter to prompt
2 parents bbfbbd9 + a3c43c9 commit f3cbbce

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
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'):

scrapegraphai/helpers/models_tokens.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,8 @@
8181
"claude_instant": 100000,
8282
"claude2": 9000,
8383
"claude2.1": 200000,
84-
"claude3": 200000
84+
"claude3": 200000,
85+
"claude3.5": 200000
8586
},
8687
"bedrock": {
8788
"anthropic.claude-3-haiku-20240307-v1:0": 200000,

0 commit comments

Comments
 (0)