Remove userPlaceholder #2962

face9462aa102e8523a47fee9af6d3bfc3debae3

Cohee <18619528+Cohee1207@users.noreply.github.com>

2 files changed, +3 -11Showing whitespace changes
default/config.yaml+0 -4
@@ -155,9 +155,5 @@ claude:
155155 # (e.g {{random}} macro or lorebooks not as in-chat injections).
156156 # Otherwise, you'll just waste money on cache misses.
157157 enableSystemPromptCache: false
158-# -- COHERE API CONFIGURATION --
159-cohere:
160- # A placeholder prompt to be used when the message array doesn't end with a user message
161- userPlaceholder: "Continue"
162158# -- SERVER PLUGIN CONFIGURATION --
163159enableServerPlugins: false
src/prompt-converters.js+3 -7
@@ -294,7 +294,7 @@ function convertCohereMessages(messages, charName = '', userName = '') {
294294 msg.content = messages[index - 1].content;
295295 messages.splice(index - 1, 1);
296296 } else {
297297 msg.content = `I'm going to call thea tool for that: ${msg.tool_calls.map(tc => tc?.function?.name).join(', ')}`;
298298 }
299299 }
300300 // No names support (who would've thought)
@@ -317,12 +317,8 @@ function convertCohereMessages(messages, charName = '', userName = '') {
317317 });
318318
319319 // A prompt should end with a user/tool message
320320 if (messages.length && !['user', 'tool'].includes(messages[messages.length - 1].role)) {
321- const userPlaceholder = getConfigValue('cohere.userPlaceholder', PROMPT_PLACEHOLDER || 'Continue');
321+ messages[messages.length - 1].role = 'user';
322- messages.push({
323- role: 'user',
324- content: userPlaceholder,
325- });
326322 }
327323
328324 return { chatHistory: messages };