Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Why is a default chat being forced? #54

Open
msj121 opened this issue Jun 12, 2023 · 0 comments
Open

Why is a default chat being forced? #54

msj121 opened this issue Jun 12, 2023 · 0 comments

Comments

@msj121
Copy link

msj121 commented Jun 12, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant