Skip to content

Commit 00a392b

Browse files
authored
Merge pull request #292 from VinciGit00/refactoring
Refactoring
2 parents 1cb71ed + c93dbe0 commit 00a392b

File tree

7 files changed

+24
-15
lines changed

7 files changed

+24
-15
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ classifiers = [
6767
"Programming Language :: Python :: 3",
6868
"Operating System :: OS Independent",
6969
]
70-
requires-python = ">= 3.9"
70+
requires-python = ">=3.9,<3.12"
7171

7272
[build-system]
7373
requires = ["hatchling"]

requirements-dev.lock

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@ certifi==2024.2.2
4545
# via requests
4646
charset-normalizer==3.3.2
4747
# via requests
48-
colorama==0.4.6
49-
# via ipython
50-
# via pytest
51-
# via tqdm
5248
dataclasses-json==0.6.6
5349
# via langchain
5450
# via langchain-community
@@ -104,7 +100,6 @@ graphviz==0.20.3
104100
# via scrapegraphai
105101
greenlet==3.0.3
106102
# via playwright
107-
# via sqlalchemy
108103
groq==0.5.0
109104
# via langchain-groq
110105
grpcio==1.63.0
@@ -217,8 +212,11 @@ pandas==2.2.2
217212
# via scrapegraphai
218213
parso==0.8.4
219214
# via jedi
215+
pexpect==4.9.0
216+
# via ipython
220217
playwright==1.43.0
221218
# via scrapegraphai
219+
# via undetected-playwright
222220
pluggy==1.5.0
223221
# via pytest
224222
prompt-toolkit==3.0.43
@@ -233,6 +231,8 @@ protobuf==4.25.3
233231
# via googleapis-common-protos
234232
# via grpcio-status
235233
# via proto-plus
234+
ptyprocess==0.7.0
235+
# via pexpect
236236
pure-eval==0.2.2
237237
# via stack-data
238238
pyasn1==0.6.0
@@ -342,6 +342,8 @@ typing-inspect==0.9.0
342342
# via dataclasses-json
343343
tzdata==2024.1
344344
# via pandas
345+
undetected-playwright==0.3.0
346+
# via scrapegraphai
345347
uritemplate==4.1.1
346348
# via google-api-python-client
347349
urllib3==2.2.1

requirements.lock

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ certifi==2024.2.2
4545
# via requests
4646
charset-normalizer==3.3.2
4747
# via requests
48-
colorama==0.4.6
49-
# via ipython
50-
# via tqdm
5148
dataclasses-json==0.6.6
5249
# via langchain
5350
# via langchain-community
@@ -102,7 +99,6 @@ graphviz==0.20.3
10299
# via scrapegraphai
103100
greenlet==3.0.3
104101
# via playwright
105-
# via sqlalchemy
106102
groq==0.5.0
107103
# via langchain-groq
108104
grpcio==1.63.0
@@ -212,8 +208,11 @@ pandas==2.2.2
212208
# via scrapegraphai
213209
parso==0.8.4
214210
# via jedi
211+
pexpect==4.9.0
212+
# via ipython
215213
playwright==1.43.0
216214
# via scrapegraphai
215+
# via undetected-playwright
217216
prompt-toolkit==3.0.43
218217
# via ipython
219218
proto-plus==1.23.0
@@ -226,6 +225,8 @@ protobuf==4.25.3
226225
# via googleapis-common-protos
227226
# via grpcio-status
228227
# via proto-plus
228+
ptyprocess==0.7.0
229+
# via pexpect
229230
pure-eval==0.2.2
230231
# via stack-data
231232
pyasn1==0.6.0
@@ -330,6 +331,8 @@ typing-inspect==0.9.0
330331
# via dataclasses-json
331332
tzdata==2024.1
332333
# via pandas
334+
undetected-playwright==0.3.0
335+
# via scrapegraphai
333336
uritemplate==4.1.1
334337
# via google-api-python-client
335338
urllib3==2.2.1

scrapegraphai/graphs/abstract_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,4 +354,4 @@ def run(self) -> str:
354354
"""
355355
Abstract method to execute the graph and return the result.
356356
"""
357-
pass
357+
pass

scrapegraphai/graphs/pdf_scraper_graph.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,4 +114,4 @@ def run(self) -> str:
114114
inputs = {"user_prompt": self.prompt, self.input_key: self.source}
115115
self.final_state, self.execution_info = self.graph.execute(inputs)
116116

117-
return self.final_state.get("answer", "No answer found.")
117+
return self.final_state.get("answer", "No answer found.")

scrapegraphai/helpers/models_tokens.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,10 @@
2323
"azure": {
2424
"gpt-3.5-turbo": 4096,
2525
"gpt-4": 8192,
26-
"gpt-4-32k": 32768
26+
"gpt-4-0613": 8192,
27+
"gpt-4-32k": 32768,
28+
"gpt-4-32k-0613": 32768,
29+
"gpt-4o": 128000,
2730
},
2831
"gemini": {
2932
"gemini-pro": 128000,
@@ -141,7 +144,8 @@
141144
"cognitivecomputations/dolphin-2.5-mixtral-8x7b": 32768,
142145
"TheBloke/dolphin-2.7-mixtral-8x7b-GGUF": 32768,
143146
"deepseek-ai/DeepSeek-V2": 131072,
144-
"deepseek-ai/DeepSeek-V2-Chat": 131072
147+
"deepseek-ai/DeepSeek-V2-Chat": 131072,
148+
"claude-3-haiku": 200000
145149
},
146150
"deepseek": {
147151
"deepseek-chat": 32768,

scrapegraphai/nodes/generate_answer_pdf_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def __init__(self, input: str, output: List[str], node_config: Optional[dict] =
4949
node_name (str): name of the node
5050
"""
5151
super().__init__(node_name, "node", input, output, 2, node_config)
52-
self.llm_model = node_config["llm"]
52+
self.llm_model = node_config["llm_model"]
5353
self.verbose = False if node_config is None else node_config.get(
5454
"verbose", False)
5555

0 commit comments

Comments
 (0)