Skip to content

Commit 86f6877

Browse files
committed
fix: removed faiss
1 parent 6f0b9d8 commit 86f6877

File tree

5 files changed

+13
-11
lines changed

5 files changed

+13
-11
lines changed

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Additional dependecies can be added while installing the library:
4242
This group allows you to use additional language models like Fireworks, Groq, Anthropic, Together AI, Hugging Face, and Nvidia AI Endpoints.
4343
```bash
4444
pip install scrapegraphai[other-language-models]
45-
45+
```
4646
- <b>Semantic Options</b>: this group includes tools for advanced semantic processing, such as Graphviz.
4747

4848
```bash
@@ -55,6 +55,12 @@ pip install scrapegraphai[other-language-models]
5555
pip install scrapegraphai[more-browser-options]
5656
```
5757

58+
- <b>faiss Options</b>: this group includes faiss integration
59+
60+
```bash
61+
pip install scrapegraphai[faiss-cpu]
62+
```
63+
5864
</details>
5965

6066

pyproject.toml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ dependencies = [
1919
"langchain-aws>=0.1.3",
2020
"mistral-common>=1.4.0",
2121
"html2text>=2024.2.26",
22-
"faiss-cpu>=1.8.0",
2322
"beautifulsoup4>=4.12.3",
2423
"pandas>=2.2.2",
2524
"python-dotenv>=1.0.1",
@@ -100,6 +99,11 @@ screenshot_scraper = [
10099
"pillow>=10.4.0",
101100
]
102101

102+
# Group 5: Faiss CPU
103+
faiss-cpu = [
104+
"faiss-cpu>=1.8.0",
105+
]
106+
103107
[build-system]
104108
requires = ["hatchling"]
105109
build-backend = "hatchling.build"

requirements-dev.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,6 @@ docutils==0.19
8080
exceptiongroup==1.2.2
8181
# via anyio
8282
# via pytest
83-
faiss-cpu==1.8.0.post1
84-
# via scrapegraphai
8583
fastapi==0.112.0
8684
# via burr
8785
fastapi-pagination==0.12.26
@@ -251,7 +249,6 @@ narwhals==1.3.0
251249
# via altair
252250
numpy==1.26.4
253251
# via contourpy
254-
# via faiss-cpu
255252
# via langchain
256253
# via langchain-aws
257254
# via langchain-community
@@ -274,7 +271,6 @@ orjson==3.10.7
274271
# via langsmith
275272
packaging==24.1
276273
# via altair
277-
# via faiss-cpu
278274
# via huggingface-hub
279275
# via langchain-core
280276
# via marshmallow

requirements.lock

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,6 @@ distro==1.9.0
4949
# via openai
5050
exceptiongroup==1.2.2
5151
# via anyio
52-
faiss-cpu==1.8.0.post1
53-
# via scrapegraphai
5452
filelock==3.15.4
5553
# via huggingface-hub
5654
# via transformers
@@ -176,7 +174,6 @@ multiprocess==0.70.16
176174
mypy-extensions==1.0.0
177175
# via typing-inspect
178176
numpy==1.26.4
179-
# via faiss-cpu
180177
# via langchain
181178
# via langchain-aws
182179
# via langchain-community
@@ -192,7 +189,6 @@ opencv-python-headless==4.10.0.84
192189
orjson==3.10.6
193190
# via langsmith
194191
packaging==24.1
195-
# via faiss-cpu
196192
# via huggingface-hub
197193
# via langchain-core
198194
# via marshmallow

scrapegraphai/nodes/generate_answer_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def execute(self, state: dict) -> dict:
9191

9292
if isinstance(self.llm_model, (ChatOpenAI, ChatMistralAI)):
9393
self.llm_model = self.llm_model.with_structured_output(
94-
schema = self.node_config["schema"])
94+
schema = self.node_config["schema"])
9595
output_parser = get_structured_output_parser(self.node_config["schema"])
9696
format_instructions = "NA"
9797
else:

0 commit comments

Comments
 (0)