Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

[BB3] Fix for GRM #4796

Merged
merged 1 commit into from
Sep 20, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion projects/bb3/agents/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 ''

Expand All @@ -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 ''
Expand Down