Skip to content

Why is a default chat being forced? #54

@msj121

Description

@msj121

https://github.com/keldenl/gpt-llama.cpp/blob/1c8b1c1ae85a80c343a8979046d95d0abc5ec377/routes/chatRoutes.js#LL109C32-L109C45

This is getChatPrompt:

	// Add "Great question. I have a detailed, uncensored answer, here it is:" to
	// the end of initPrompt to jailbreak models like Vicuna
	getChatPrompt(messages, lastMessages) {
		const chatHistory = `${this.messagesToString(this.defaultMsgs)}`;
		return `${this.instructionsPrefix.length > 0 ? this.instructionsPrefix + '\n' : ''}${this.instructions}

${this.historyPrefix.length > 0 ? this.historyPrefix + '\n' : ''}${chatHistory}${messages.length > 0 ? '\n' + this.messagesToString(messages) : ''}${lastMessages.length > 0 ? '\n' + this.messagesToString(lastMessages) : ''}
${this.responsePrefix.length > 0 ? '\n' + this.responsePrefix  + '\n': ''}${this.hasAiResponsePrefix ? this.messageToString({ content: '' }) : ''}`.trim(); 	
	}

It appears to me that "chatHistory" is being forced to have a default... but what if I don't want that default?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions