Skip to content

Commit 8de720d

Browse files
committed
feat: removed a bug
1 parent 1dde43c commit 8de720d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

examples/groq/smart_scraper_groq.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@
2222
"api_key": groq_key,
2323
"temperature": 0
2424
},
25+
"embeddings": {
26+
"model": "ollama/nomic-embed-text",
27+
"temperature": 0,
28+
"base_url": "http://localhost:11434", # set ollama URL arbitrarily
29+
},
2530
"headless": False
2631
}
2732

scrapegraphai/models/groq.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
from langchain_groq import ChatGroq
66

7-
87
class Groq(ChatGroq):
98
"""
109
A wrapper for the Groq class that provides default configuration

scrapegraphai/nodes/generate_answer_node.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
from tqdm import tqdm
1313

1414
from ..utils.logging import get_logger
15-
15+
from ..models import Ollama, Groq
1616
# Imports from the library
1717
from .base_node import BaseNode
1818
from ..helpers import template_chunks, template_no_chunks, template_merge, template_chunks_with_schema, template_no_chunks_with_schema
@@ -45,7 +45,9 @@ def __init__(
4545
):
4646
super().__init__(node_name, "node", input, output, 2, node_config)
4747
self.llm_model = node_config["llm_model"]
48-
self.llm_model.format="json"
48+
49+
if isinstance(node_config["llm_model"], Ollama):
50+
self.llm_model.format="json"
4951
self.verbose = (
5052
True if node_config is None else node_config.get("verbose", False)
5153
)

0 commit comments

Comments
 (0)