Skip to content

how to use non-json output parsers with SmartScraperGraph? #1000

Open
@prusswan

Description

@prusswan

Right now, due to the logic in GenerateAnswerNode (used by SmartScraperGraph), JsonOutputParser is always added when llm_model is an instance of ChatOpenAI. As I am using models that may not always return valid JSON, I prefer to use StrOutputParser to handle the raw llm response content, before trying to parse JSON directly.

I could use JsonOutputParser too if there is way to add/perform error handling for invalid JSON.

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions