Skip to content

Instantly share code, notes, and snippets.

View SnarkyDeveloper's full-sized avatar
:octocat:
// Today's hype is tomorrow's incident

SnarkyDev SnarkyDeveloper

:octocat:
// Today's hype is tomorrow's incident
View GitHub Profile
@SnarkyDeveloper
SnarkyDeveloper / helper.js
Last active January 4, 2026 00:08
Inline Helper - Browser JS/Bookmarklet
(function() {
"use strict";
let messages = [];
const baseUrl = 'https://text.pollinations.ai/';
const system =
'You are a simple browser agent model that returns short answers to the user, consise and simple. Selections by user in browser will be indicated by SELECTION[text], where text is what is currently selected. You will not bring up specific things like SELECTION[text]';
function toMessage(role, content, image_blob=undefined) {
if (image_blob) {
let r = { role: role, content: [{type: "text", text: content}] };