correctly appending the additional text when no placeholder is used in an API integration. see #681
This commit is contained in:
parent
0300c873fd
commit
7048164ee0
1 changed files with 2 additions and 1 deletions
|
|
@ -266,7 +266,8 @@ browser.runtime.onMessage.addListener((message, sender, sendResponse) => {
|
|||
if(userInput !== null) {
|
||||
if(!placeholdersUtils.hasPlaceholder(promptData.prompt, 'additional_text')){
|
||||
// no additional_text placeholder, do as usual
|
||||
promptData.prompt += " " + userInput;
|
||||
const inputText = Array.isArray(userInput) ? userInput.map(obj => obj.custom_text).join(' ') : userInput;
|
||||
promptData.prompt += " " + inputText;
|
||||
}else{
|
||||
// we have the additional_text placeholder, do the magic!
|
||||
let finalSubs = {};
|
||||
|
|
|
|||
Loading…
Reference in a new issue