Slide 122
Slide 122 text
CHROME
const session = await LanguageModel.create({
initialPrompts: [{
role: 'system',
content: 'Summarise this review for me.'
}],
});
const result = await session.prompt(
`${review}`,
{ responseConstraint: {
type: 'object',
properties: {
summary:
{ type: 'string' },
sentiment: { enum: ['positive', 'neutral', 'negative']},
},
}},
);