Skip to content

Commit

Permalink
add assistant role (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
dragazo authored May 22, 2024
1 parent 23f27a5 commit 1f1ea54
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions extensions/OpenAIBlocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 });
}
Expand Down

0 comments on commit 1f1ea54

Please sign in to comment.