This came up in a forum discussion, and the spec doesn't really say what the correct behavior is.
const prefix = 'Hello';
const m = await LanguageModel.create();
const response = await m.prompt([
{ role: "user", content: "Hello" },
{ role: "assistant", content: prefix, prefix: true },
]);
Should the response actually start with the prefix, that is, "Hello", or should it not start with the prefix, so you need to manually append the prefix to the response. Is it safe to assume the response will start with a ' ' (space)?
const finalResponse = prefix + response;