Skip to content

Initial prompts being dropped#174

Open
mikechao wants to merge 2 commits intojakobhoeg:mainfrom
mikechao:initial-prompts
Open

Initial prompts being dropped#174
mikechao wants to merge 2 commits intojakobhoeg:mainfrom
mikechao:initial-prompts

Conversation

@mikechao
Copy link
Contributor

This PR fixes the issue where the initialPrompts property are being dropped when creating a browserAI.

For example

browserAI("text", {
      expectedInputs: [{ type: "text" }, { type: "image" }, { type: "audio" }],
      initialPrompts: [{ role: "system", content: "You will talk like a pirate" }],
      onContextOverflow: this.onContextOverflow,
    });

The system prompt of "You will talk like a pirate" is discarded.

Below is the example chat app where I added a system prompt panel. And in the new panel I put "You will talk like a pirate and use a lot of pirate related emojis"

Screenshot 2026-03-19 at 12 15 15 PM

@vercel
Copy link

vercel bot commented Mar 19, 2026

@mikechao is attempting to deploy a commit to the browser-ai OSS Program Team on Vercel.

A member of the Team first needs to authorize it.

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

Successfully merging this pull request may close these issues.

1 participant