web-ai-toolkit icon indicating copy to clipboard operation
web-ai-toolkit copied to clipboard

[Discussion] Considering integrating the Built-in AI APIs

Open andreban opened this issue 1 year ago • 4 comments

The Built-in AI APIs are a set of browser APIs that implement a task driven APIs, including summarization which overlaps with the ones in the web-ai-toolkit.

While the goal would be that all browsers support the Built-in AI APIs, we know that it will take time until it's available across all browsers and platforms, so I was wondering if you've considered using the Built-in APIs for task where the API exists (Summarization), then relying on downloading a model when it doesn't.

andreban avatar Feb 24 '25 16:02 andreban

Hey Andre! Yep this is a great idea and as you can see I implemented support for the built in Summarizer API. I love that the built in APIs are starting to get real traction now!

jgw96 avatar Jun 22 '25 22:06 jgw96

reopening for discussion if needed

jgw96 avatar Jun 22 '25 22:06 jgw96

Great stuff, @jgw96!

I noticed you are using the summary of summaries approach to summarize larger text (not sure you saw the article before). One thing that can be improved is that the Summarizer now has an inputQuota and measureInputUsage methods, so you don't have to hardcode values. You can see some sample usage in the source code for the summary of summaries demo.

Hope this helps!

andreban avatar Jun 23 '25 09:06 andreban

Thank you! Ahh nice, didn't see this. Thanks for sharing! I love how fast these APIs are getting better.

jgw96 avatar Jul 03 '25 04:07 jgw96