-
Notifications
You must be signed in to change notification settings - Fork 42
[FR] Document Object Model Integration #70
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Here is a current version of the slideshow that I hope to present at the 03-31 meeting, time permitting: Prompt-API-Plus-DOM.pptx . |
@domenic, as asked during the meeting: what are some of the benefits and use-case scenarios that would be enabled or simplified by having markup-based prompts in addition to text-based prompts?
const response = await fetch('https://example.org/prompts/prompt-123.promptml');
const text = await response.text();
const parser = new DOMParser();
const the_prompt = parser.parseFromString(text, 'application/xml');
const result = await session.prompt(the_prompt);
A related question is: which features could not be provided – either at all or in the same way – using a JavaScript library which uses or encapsulates the Prompt API?
A new question is: should a Prompt Markup Language be able to express, in addition to user prompts, system prompts and their components, e.g., tool-definition sections, and/or chat histories, e.g., sequences of prompts? |
Uh oh!
There was an error while loading. Please reload this page.
Introduction
What if, in addition to text-string prompts, DOM documents could be used as prompts?
This would enable model-independent multimodal prompting in a manner intuitive to Web developers.
As considered, such multimodal prompts could utilize a subset of HTML5 markup tags including those for: sections and paragraphs of text, source code, mathematics, lists, tables, images, audio, video, and embedded files and data.
The
prompt()
andpromptStreaming()
functions on sessions could distinguish between provided arguments of typesstring
andDocument
.Text
Mathematics
Lists
Tables
Images
Audio
Video
Embedding Files and Data
Metadata
Prompt Markup Language
Prompt Templates
Prompt Events
Exchange Markup Language
The text was updated successfully, but these errors were encountered: