mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-06 21:11:37 +08:00
feat: removed a bug
This commit is contained in:
parent
1dde43cdeb
commit
8de720d379
@ -22,6 +22,11 @@ graph_config = {
|
||||
"api_key": groq_key,
|
||||
"temperature": 0
|
||||
},
|
||||
"embeddings": {
|
||||
"model": "ollama/nomic-embed-text",
|
||||
"temperature": 0,
|
||||
"base_url": "http://localhost:11434", # set ollama URL arbitrarily
|
||||
},
|
||||
"headless": False
|
||||
}
|
||||
|
||||
|
||||
@ -4,7 +4,6 @@ Groq Module
|
||||
|
||||
from langchain_groq import ChatGroq
|
||||
|
||||
|
||||
class Groq(ChatGroq):
|
||||
"""
|
||||
A wrapper for the Groq class that provides default configuration
|
||||
|
||||
@ -12,7 +12,7 @@ from langchain_core.runnables import RunnableParallel
|
||||
from tqdm import tqdm
|
||||
|
||||
from ..utils.logging import get_logger
|
||||
|
||||
from ..models import Ollama, Groq
|
||||
# Imports from the library
|
||||
from .base_node import BaseNode
|
||||
from ..helpers import template_chunks, template_no_chunks, template_merge, template_chunks_with_schema, template_no_chunks_with_schema
|
||||
@ -45,7 +45,9 @@ class GenerateAnswerNode(BaseNode):
|
||||
):
|
||||
super().__init__(node_name, "node", input, output, 2, node_config)
|
||||
self.llm_model = node_config["llm_model"]
|
||||
self.llm_model.format="json"
|
||||
|
||||
if isinstance(node_config["llm_model"], Ollama):
|
||||
self.llm_model.format="json"
|
||||
self.verbose = (
|
||||
True if node_config is None else node_config.get("verbose", False)
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user