fix: screenshot_scraper

This commit is contained in:
Marco Vinciguerra 2024-09-07 14:55:12 +02:00
parent 9e9c77551f
commit ef7a5891dc
2 changed files with 1 additions and 2 deletions

View File

@ -73,7 +73,7 @@ class GenerateAnswerFromImageNode(BaseNode):
supported_models = ("gpt-4o", "gpt-4o-mini", "gpt-4-turbo") supported_models = ("gpt-4o", "gpt-4o-mini", "gpt-4-turbo")
if self.node_config["config"]["llm"]["model"] not in supported_models: if self.node_config["config"]["llm"]["model"].split("/")[-1]not in supported_models:
raise ValueError(f"""Model '{self.node_config['config']['llm']['model']}' raise ValueError(f"""Model '{self.node_config['config']['llm']['model']}'
is not supported. Supported models are: is not supported. Supported models are:
{', '.join(supported_models)}.""") {', '.join(supported_models)}.""")

View File

@ -76,7 +76,6 @@ class MergeAnswersNode(BaseNode):
self.llm_model = self.llm_model.with_structured_output( self.llm_model = self.llm_model.with_structured_output(
schema = self.node_config["schema"], schema = self.node_config["schema"],
method="function_calling") # json schema works only on specific models method="function_calling") # json schema works only on specific models
# default parser to empty lambda function # default parser to empty lambda function
output_parser = lambda x: x output_parser = lambda x: x
if is_basemodel_subclass(self.node_config["schema"]): if is_basemodel_subclass(self.node_config["schema"]):