mirror of
https://github.com/VinciGit00/Scrapegraph-ai.git
synced 2026-07-01 21:00:48 +08:00
fix: screenshot_scraper
This commit is contained in:
parent
9e9c77551f
commit
ef7a5891dc
@ -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)}.""")
|
||||||
|
|||||||
@ -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"]):
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user