-
Notifications
You must be signed in to change notification settings - Fork 68
Closed
Description
Hi,
the section "Constraining responses by providing a prefix" (https://github.com/webmachinelearning/prompt-api?tab=readme-ov-file#constraining-responses-by-providing-a-prefix) starts with this snippet of sample code:
const followup = await session.prompt([
[
{
role: "user",
content: "I'm nervous about my presentation tomorrow"
},
{
role: "assistant"
content: "Presentations are tough!"
}
]
]);
The argument to prompt is an array containing a single element that is also an array. The inner array looks a lot like the other examples of multimodal prompts. Could it be that that should be the argument (ommitting the outer array), like so:
const followup = await session.prompt([
{
role: "user",
content: "I'm nervous about my presentation tomorrow"
},
{
role: "assistant"
content: "Presentations are tough!"
}
]);
Metadata
Metadata
Assignees
Labels
No labels