Closed psmitsu closed 1 month ago
Hi, this is is a great idea thanks for the PR! Sorry for the late response - there's one change needed here and I'll get this merged.
@gsuuon I've changed re-adding separator in on_finish
and fixed the typo :smiley:
Awesome contribution, thanks again!
Hello, thank you for a great plugin!
Sometimes it is convenient to prepare the "assistant" response before sending the whole prompt to an LLM. E.g. I can type manually:
and run
:Mchat
here. I would expect the LLM to continueHello! What a
withnice day!
for example.In chat mode, this can be done by creating a prompt like that:
However, doing as described above will make the assistant response be written after a separator as if it is a new message:
Hello! What a
is what I typed, andlovely day...
is the llm's "assistant" response.This PR adds a simple change to chat processing s.t. a separator is not added when the last message belongs to the assistant. I.e. if the last message belongs to the assistant, then new messages from LLM should be concatenated with it.