Remove userPlaceholder #2962
| @@ -155,9 +155,5 @@ claude: | ||
| 155 | 155 | # (e.g {{random}} macro or lorebooks not as in-chat injections). |
| 156 | 156 | # Otherwise, you'll just waste money on cache misses. |
| 157 | 157 | 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" | |
| 162 | 158 | # -- SERVER PLUGIN CONFIGURATION -- |
| 163 | 159 | enableServerPlugins: false |
| @@ -294,7 +294,7 @@ function convertCohereMessages(messages, charName = '', userName = '') { | ||
| 294 | 294 | msg.content = messages[index - 1].content; |
| 295 | 295 | messages.splice(index - 1, 1); |
| 296 | 296 | } else { |
| 297 | 297 | msg.content = `I'm going to call thea tool for that: ${msg.tool_calls.map(tc => tc?.function?.name).join(', ')}`; |
| 298 | 298 | } |
| 299 | 299 | } |
| 300 | 300 | // No names support (who would've thought) |
| @@ -317,12 +317,8 @@ function convertCohereMessages(messages, charName = '', userName = '') { | ||
| 317 | 317 | }); |
| 318 | 318 | |
| 319 | 319 | // A prompt should end with a user/tool message |
| 320 | 320 | 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 | - }); | |
| 326 | 322 | } |
| 327 | 323 | |
| 328 | 324 | return { chatHistory: messages }; |