From 82c21107c3c66b54494615107916b03476c17414 Mon Sep 17 00:00:00 2001 From: klshuster Date: Tue, 20 Sep 2022 19:00:58 -0400 Subject: [PATCH] Fix for grm --- projects/bb3/agents/module.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/projects/bb3/agents/module.py b/projects/bb3/agents/module.py index 8ed66dcac51..90b9ab55576 100644 --- a/projects/bb3/agents/module.py +++ b/projects/bb3/agents/module.py @@ -209,7 +209,9 @@ def opt_shots(self) -> str: def opt_pre_context_tok(self): import projects.bb3.prompts as PROMPT - if self.is_knowledge() and self is not Module.CONTEXTUAL_KNOWLEDGE: + if ( + self.is_knowledge() and self is not Module.CONTEXTUAL_KNOWLEDGE + ) or self is Module.GROUNDED_DIALOGUE: return PROMPT.PRE_CONTEXT_TOK return '' @@ -219,6 +221,7 @@ def opt_post_context_tok(self): if self.is_dialogue() and self not in [ Module.VANILLA_DIALOGUE, Module.OPENING_DIALOGUE, + Module.GROUNDED_DIALOGUE, ]: return PROMPT.POST_CONTEXT_TOK return ''