From 2b7ba9586fb80cfbc47c77ad7bbbb03f7d6bc0df Mon Sep 17 00:00:00 2001 From: matatonic <73265741+matatonic@users.noreply.github.com> Date: Mon, 29 May 2023 13:19:57 -0400 Subject: [PATCH] Fixes #2326, KeyError: 'assistant' (#2382) --- extensions/openai/script.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/openai/script.py b/extensions/openai/script.py index d41592a3..b865fe7e 100644 --- a/extensions/openai/script.py +++ b/extensions/openai/script.py @@ -259,7 +259,7 @@ class Handler(BaseHTTPRequestHandler): role_formats = { 'user': 'user: {message}\n', - 'bot': 'assistant: {message}\n', + 'assistant': 'assistant: {message}\n', 'system': '{message}', 'context': 'You are a helpful assistant. Answer as concisely as possible.', 'prompt': 'assistant:',