From e32aed3148a0692ec88c8ce68d5e25987b3774cb Mon Sep 17 00:00:00 2001 From: Shroominic Date: Sun, 28 Jan 2024 19:06:02 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=97=91=EF=B8=8F=20Remove=20obsolete=20par?= =?UTF-8?q?sers.py=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/funcchain/parser/parsers.py | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 src/funcchain/parser/parsers.py diff --git a/src/funcchain/parser/parsers.py b/src/funcchain/parser/parsers.py deleted file mode 100644 index 68bcf3f..0000000 --- a/src/funcchain/parser/parsers.py +++ /dev/null @@ -1,20 +0,0 @@ -from typing import TypeVar - -from langchain_core.output_parsers import BaseOutputParser - -from ..syntax.output_types import CodeBlock as CodeBlock - -T = TypeVar("T") - - -# TODO: remove and implement primitive type output parser using nested pydantic extraction -class BoolOutputParser(BaseOutputParser[bool]): - def parse(self, text: str) -> bool: - return text.strip()[:1].lower() == "y" - - def get_format_instructions(self) -> str: - return "\nAnswer only with 'Yes' or 'No'." - - @property - def _type(self) -> str: - return "bool"