feat: removed a bug

This commit is contained in:
Marco Vinciguerra 2024-06-03 21:45:37 +02:00
parent 1dde43cdeb
commit 8de720d379
3 changed files with 9 additions and 3 deletions

View File

@ -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
}

View File

@ -4,7 +4,6 @@ Groq Module
from langchain_groq import ChatGroq
class Groq(ChatGroq):
"""
A wrapper for the Groq class that provides default configuration

View File

@ -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)
)