mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-06 21:11:37 +08:00
feat: fix an if
This commit is contained in:
parent
8de720d379
commit
c8d556da4e
@ -12,7 +12,7 @@ from langchain_core.runnables import RunnableParallel
|
|||||||
from tqdm import tqdm
|
from tqdm import tqdm
|
||||||
|
|
||||||
from ..utils.logging import get_logger
|
from ..utils.logging import get_logger
|
||||||
from ..models import Ollama, Groq
|
from ..models import Ollama, Groq, OpenAI
|
||||||
# Imports from the library
|
# Imports from the library
|
||||||
from .base_node import BaseNode
|
from .base_node import BaseNode
|
||||||
from ..helpers import template_chunks, template_no_chunks, template_merge, template_chunks_with_schema, template_no_chunks_with_schema
|
from ..helpers import template_chunks, template_no_chunks, template_merge, template_chunks_with_schema, template_no_chunks_with_schema
|
||||||
@ -46,7 +46,7 @@ class GenerateAnswerNode(BaseNode):
|
|||||||
super().__init__(node_name, "node", input, output, 2, node_config)
|
super().__init__(node_name, "node", input, output, 2, node_config)
|
||||||
self.llm_model = node_config["llm_model"]
|
self.llm_model = node_config["llm_model"]
|
||||||
|
|
||||||
if isinstance(node_config["llm_model"], Ollama):
|
if isinstance(node_config["llm_model"], Ollama) or isinstance(node_config["llm_model"], OpenAI):
|
||||||
self.llm_model.format="json"
|
self.llm_model.format="json"
|
||||||
self.verbose = (
|
self.verbose = (
|
||||||
True if node_config is None else node_config.get("verbose", False)
|
True if node_config is None else node_config.get("verbose", False)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user