From 0a6dd8f7d842ed4a1c531b80e7ec70f4e800fe84 Mon Sep 17 00:00:00 2001 From: somebody Date: Tue, 27 Dec 2022 18:52:22 -0600 Subject: [PATCH] Add prompt "support" --- koboldai_settings.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/koboldai_settings.py b/koboldai_settings.py index 4490a009..1302b8af 100644 --- a/koboldai_settings.py +++ b/koboldai_settings.py @@ -2111,9 +2111,15 @@ class KoboldStoryRegister(object): """ Returns a list of chunks that comprise an action in dictionaries formatted as follows: - type: string identifying chunk type ("ai", "user", or "edit") + type: string identifying chunk type ("ai", "user", "edit", or "prompt") content: the actual content of the chunk """ + # Prompt doesn't need standard edit data + if action_id == -1: + if self.koboldai_vars.prompt: + return [{"type": "prompt", "content": self.koboldai_vars.prompt}] + return [] + current_text = self.actions[action_id]["Selected Text"] action_original_type = "ai"