Do not apped start new chat messages on example chat handling

The prompt manager does this job now.
This commit is contained in:
maver 2023-06-02 19:15:21 +02:00
parent 5a6340165c
commit b54bd36d65
1 changed files with 0 additions and 7 deletions

View File

@ -488,10 +488,6 @@ function prepareExampleMessages(messages, exampleMessages, includeAll = false, )
for (const element of exampleMessages) {
// get the current example block with multiple user/bot messages
let example_block = element;
// add the first message from the user to tell the model that it's a new dialogue
if (example_block.length != 0) {
examples_tosend.push(new_chat_msg);
}
for (const example of example_block) {
// add all the messages from the example
examples_tosend.push(example);
@ -529,9 +525,6 @@ function prepareExampleMessages(messages, exampleMessages, includeAll = false, )
continue;
}
// include the heading
example_block = [new_chat_msg, ...example_block];
// add the block only if there is enough space for all its messages
const example_count = countTokens(example_block)
if ((total_count + example_count) < (oai_settings.openai_max_context - oai_settings.openai_max_tokens)) {