From 1f1ea547f6a258d908a6c7c8940877720ed3f68e Mon Sep 17 00:00:00 2001 From: Devin Jean Date: Wed, 22 May 2024 16:36:35 -0500 Subject: [PATCH] add assistant role (#69) --- extensions/OpenAIBlocks/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/extensions/OpenAIBlocks/index.js b/extensions/OpenAIBlocks/index.js index 0cdf6f3..d46367e 100644 --- a/extensions/OpenAIBlocks/index.js +++ b/extensions/OpenAIBlocks/index.js @@ -89,8 +89,8 @@ } const role = row.contents[0].toLowerCase(); const content = row.contents[1]; - if (!['system', 'user'].some((x) => x === role)) { - throw Error('speaker must be \'system\' or \'user\''); + if (!['system', 'user', 'assistant'].some((x) => x === role)) { + throw Error('speaker must be \'system\', \'user\', or \'assistant\''); } res.push({ role, content }); }