From d5beccb774840a6c6e36f1ac4668cb24389cf7a5 Mon Sep 17 00:00:00 2001 From: Adam Wilson Date: Sat, 16 Aug 2025 19:26:12 -0600 Subject: [PATCH] remove additional reflexion support --- src/text_generation/common/constants.py | 5 +---- .../nlp/abstract_text_generation_completion_service.py | 9 --------- 2 files changed, 1 insertion(+), 13 deletions(-) diff --git a/src/text_generation/common/constants.py b/src/text_generation/common/constants.py index dcdb33c54..0450e998c 100644 --- a/src/text_generation/common/constants.py +++ b/src/text_generation/common/constants.py @@ -23,18 +23,15 @@ class Constants: PHI_3_MINI_4K_INSTRUCT__02_ZERO_SHOT_CHAIN_OF_THOUGHT = "phi-3-mini-4k-instruct.02-zero-shot-cot" PHI_3_MINI_4K_INSTRUCT__03_FEW_SHOT_EXAMPLES = "phi-3-mini-4k-instruct.03-few-shot" PHI_3_MINI_4K_INSTRUCT__04_FEW_SHOT_RAG_PLUS_COT = "phi-3-mini-4k-instruct.04-few-shot-rag-plus-cot" - PHI_3_MINI_4K_INSTRUCT__05_REFLEXION = "phi-3-mini-4k-instruct.05-reflexion" # OpenELM templates: apple/OpenELM-3B-Instruct OPENELM_3B_INSTRUCT__01_BASIC = "openelm-3b-instruct.01-basic" OPENELM_3B_INSTRUCT__02_ZERO_SHOT_CHAIN_OF_THOUGHT = "openelm-3b-instruct.02-zero-shot-cot" OPENELM_3B_INSTRUCT__03_FEW_SHOT_EXAMPLES = "openelm-3b-instruct.03-few-shot" OPENELM_3B_INSTRUCT__04_FEW_SHOT_RAG_PLUS_COT = "openelm-3b-instruct.04-few-shot-rag-plus-cot" - OPENELM_3B_INSTRUCT__05_REFLEXION = "openelm-3b-instruct.05-reflexion" # meta-llama/Llama-3.2-3B-Instruct templates LLAMA_1_1B_CHAT__01_BASIC = "llama-3.2-3b-instruct.01-basic" LLAMA_1_1B_CHAT__02_ZERO_SHOT_CHAIN_OF_THOUGHT = "llama-3.2-3b-instruct.02-zero-shot-cot" LLAMA_1_1B_CHAT__03_FEW_SHOT_EXAMPLES = "llama-3.2-3b-instruct.03-few-shot" - LLAMA_1_1B_CHAT__04_FEW_SHOT_RAG_PLUS_COT = "llama-3.2-3b-instruct.04-few-shot-rag-plus-cot" - LLAMA_1_1B_CHAT__05_REFLEXION = "llama-3.2-3b-instruct.05-reflexion" \ No newline at end of file + LLAMA_1_1B_CHAT__04_FEW_SHOT_RAG_PLUS_COT = "llama-3.2-3b-instruct.04-few-shot-rag-plus-cot" \ No newline at end of file diff --git a/src/text_generation/services/nlp/abstract_text_generation_completion_service.py b/src/text_generation/services/nlp/abstract_text_generation_completion_service.py index b675fd201..55c5a9b55 100644 --- a/src/text_generation/services/nlp/abstract_text_generation_completion_service.py +++ b/src/text_generation/services/nlp/abstract_text_generation_completion_service.py @@ -20,11 +20,6 @@ class AbstractTextGenerationCompletionService(abc.ABC): """Enable RAG context security guidelines""" raise NotImplementedError - @abc.abstractmethod - def with_reflexion_guardrails(self) -> 'AbstractTextGenerationCompletionService': - """Apply security guardrails using the reflexion technique""" - raise NotImplementedError - @abc.abstractmethod def is_chain_of_thought_enabled(self) -> bool: raise NotImplementedError @@ -33,10 +28,6 @@ class AbstractTextGenerationCompletionService(abc.ABC): def is_rag_context_enabled(self) -> bool: raise NotImplementedError - @abc.abstractmethod - def is_reflexion_enabled(self) -> bool: - raise NotImplementedError - @abc.abstractmethod def invoke(self, user_prompt: str) -> AbstractTextGenerationCompletionResult: raise NotImplementedError \ No newline at end of file