Spaces:
Sleeping
Sleeping
Download parser.py from AnkurGoswami/test: direct link, hf CLI and curl.
- Browser
- Download file 422 Bytes
-
https://huggingface.co/spaces/AnkurGoswami/test/resolve/main/parser.py
- Command line
-
hf download hf://spaces/AnkurGoswami/test/parser.py
-
curl -L -o parser.py https://huggingface.co/spaces/AnkurGoswami/test/resolve/main/parser.py
422 Bytes
| """ | |
| Centralized output parsers for the pipeline. | |
| Currently home to the extractor's router/judge parsers. Add new parsers | |
| here rather than inlining them next to the chains that use them. | |
| """ | |
| from langchain_core.output_parsers import JsonOutputParser | |
| from schema import JudgeResult, RouterResult | |
| router_parser = JsonOutputParser(pydantic_object=RouterResult) | |
| judge_parser = JsonOutputParser(pydantic_object=JudgeResult) | |