Skip to content

Commit

Permalink
fix prompt was empty. Set default prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
clmnin committed Aug 19, 2023
1 parent bc821e4 commit c00d3f9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/src/background/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@ let CORE = browserName === "Chrome" ? chrome : browser;

const KEY_ACCESS_TOKEN = "accessToken";

let prompt = '';
let prompt = "";
let apiKey = "";
CORE.storage.sync.get(["prompt", "apiKey"], function (items) {
if (items && items.prompt) {
prompt = items.prompt;
} else {
// Choose default (en) prompt
prompt = "You are acting as a summarization AI, and for the input text please summarize it to the most important 3 to 5 bullet points for brevity: "
}
if (items && items.apiKey) {
apiKey = items.apiKey;
Expand Down

0 comments on commit c00d3f9

Please sign in to comment.