This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (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}] }; |