14rel="icon"
15href="https://glitch.com/edit/favicon-app.ico"
16type="image/x-icon"
17> -->
18<!-- import the webpage's stylesheet -->
Gemini-2-5-Pro-O-01main.tsx61 matches
2import { OpenAI } from "npm:openai";
34const IMAGE_COST = 400;
5const TEXT_COST = 400;
6const FILE_ANALYSIS_COST = 400;
4445const POE_MODELS = {
46imageGeneration: [
47"Flux-schnell",
48"Flux-schnell-DI",
49"ImageCreatorSD",
50"Free-GPT-Image-1"
51],
52textGeneration: [
65"Llama-3.1-8b-DI"
66],
67imageAnalysis: [
68"Qwen3-235B-A22B",
69"Gemini-1.5-Flash",
118119function selectOptimalTokens(contentLength: number, taskType: string): number {
120if (taskType === "Image Generation") return 1024;
121if (contentLength < 100) return 1024; // Short queries
122if (contentLength < 500) return 1500; // Medium queries
130taskType: string,
131timeout: number = 15000,
132isImageGeneration: boolean = false
133): Promise<string | null> {
134try {
153const content = message?.content;
154155if (isImageGeneration && message?.attachments && message.attachments.length > 0) {
156const imageAttachment = message.attachments.find(att =>
157att.content_type && att.content_type.startsWith('image/')
158);
159if (imageAttachment && imageAttachment.url) {
160return imageAttachment.url;
161}
162}
175taskType: string,
176timeout: number = 15000,
177isImageGeneration: boolean = false
178): Promise<string | null> {
179// Try first 2 models in parallel for speed
187for (const model of parallelModels) {
188promises.push(
189callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration)
190.then(result => ({ result, model, keyIndex }))
191);
203console.log(`Success with ${successful.value.model} (API key ${successful.value.keyIndex + 1})`);
204
205if (isImageGeneration) {
206const urlMatch = successful.value.result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
207if (urlMatch) {
208send("replace_response", {
209text: `π¨ **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n`
210});
211return urlMatch[0];
232for (const model of remainingModels) {
233for (let keyIndex = 0; keyIndex < POE_API_KEYS.length; keyIndex++) {
234const result = await callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration);
235if (result) {
236if (isImageGeneration) {
237const urlMatch = result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
238if (urlMatch) {
239send("replace_response", {
240text: `π¨ **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n`
241});
242return urlMatch[0];
260}
261262async function imageToBase64(imageUrl: string): Promise<{ data: string; mimeType: string }> {
263try {
264const response = await fetch(imageUrl, { timeout: 8000 });
265if (!response.ok) {
266throw new Error(`Failed to fetch image: ${response.status}`);
267}
268const arrayBuffer = await response.arrayBuffer();
269const buffer = Buffer.from(arrayBuffer);
270const mimeType = response.headers.get('content-type') || 'image/jpeg';
271return { data: buffer.toString('base64'), mimeType: mimeType };
272} catch (error) {
273console.error('Error converting image to base64:', error);
274throw error;
275}
281send: SendEventFn,
282taskType: string,
283imageUrl?: string
284): Promise<string | null> {
285try {
287
288let parts: any[] = [{ text: prompt }];
289if (imageUrl) {
290const { data: imageBase64, mimeType } = await imageToBase64(imageUrl);
291parts.push({
292inline_data: {
293mime_type: mimeType,
294data: imageBase64
295}
296});
338}
339340async function generateImage(prompt: string, send: SendEventFn): Promise<void> {
341let cleanPrompt = prompt;
342if (cleanPrompt.endsWith('--image')) {
343cleanPrompt = cleanPrompt.substring(0, cleanPrompt.length - 7).trim();
344}
345346const imagePrompt = `Detailed ${cleanPrompt}`;
347send("text", { text: `π¨ Generating image...` });
348349const result = await callPoeModelParallel(
350POE_MODELS.imageGeneration,
351imagePrompt,
352send,
353"Image Generation",
35415000,
355true
358if (!result) {
359send("error", {
360text: `β Image generation failed: All models exhausted.`,
361allow_retry: true
362});
436}
437438async function analyzeImage(imageUrl: string, userPrompt: string, send: SendEventFn): Promise<void> {
439let analysisPrompt: string;
440if (!userPrompt || userPrompt.trim().length === 0) {
441analysisPrompt = `Analyze this image in detail. Provide a comprehensive analysis including what you see, colors, objects, people, text, context, and any other relevant details.`;
442} else {
443analysisPrompt = `${userPrompt}`;
444}
445446send("text", { text: `π Analyzing image...` });
447448// Try Gemini Pro with vision first
449const geminiResult = await callGeminiApi(GEMINI_VISION_CONFIG, analysisPrompt, send, "Image Analysis", imageUrl);
450if (geminiResult) return;
451452// Fallback to Poe models with URL reference
453const fallbackPrompt = `Analyze image: ${imageUrl}\n\nUser's request: ${userPrompt || "Provide detailed analysis"}`;
454const poeResult = await callPoeModelParallel(
455POE_MODELS.imageAnalysis,
456fallbackPrompt,
457send,
458"Image Analysis",
45915000
460);
462if (!poeResult) {
463send("error", {
464text: `β Image analysis failed: All models exhausted.`,
465allow_retry: true
466});
509}
510511if (cleanContent.endsWith('--image')) {
512return { intent: 'image_generation', useClaudeModels };
513}
514518519if (hasAttachments) {
520if (lowerContent.includes('image') || lowerContent.includes('picture') ||
521lowerContent.includes('photo') || lowerContent.includes('analyze') ||
522lowerContent.includes('what') || lowerContent.includes('describe')) {
523return { intent: 'image_analysis', useClaudeModels };
524}
525return { intent: 'file_analysis', useClaudeModels };
526}
527528if (lowerContent.includes('generate image') || lowerContent.includes('create image') ||
529lowerContent.includes('draw') || lowerContent.includes('picture of') ||
530lowerContent.includes('image of')) {
531return { intent: 'image_generation', useClaudeModels };
532}
533563try {
564switch (intent) {
565case 'image_generation':
566await generateImage(userContent, send);
567break;
568590break;
591592case 'image_analysis':
593if (attachments.length > 0) {
594const imageAttachment = attachments.find(att =>
595att.content_type && att.content_type.startsWith('image/')
596);
597if (imageAttachment && imageAttachment.url) {
598await analyzeImage(imageAttachment.url, userContent, send);
599} else {
600send("error", {
605} else {
606send("error", {
607text: "Please attach an image for analysis.",
608allow_retry: false,
609});
652const rateCard = "| Task Type | Price |\n" +
653"|-----------|-------|\n" +
654`| Input (image) | ${IMAGE_COST} points/message |\n` +
655`| Input (file) | ${FILE_ANALYSIS_COST} points/message |\n` +
656`| Input (text) | ${TEXT_COST} points/message |\n` +
657`| Output (search) | ${SEARCH_COST} points/message |\n` +
658`| Output (image) | ${IMAGE_COST} points/message |\n`;
659660return {
11tip
12swap
13og images: starter pack (copy from other miniapp)
14viewer fid in neynar requests
15starter pack galleries
Gemini-2-5-Pro-O-02main.tsx61 matches
2import { OpenAI } from "npm:openai";
34const IMAGE_COST = 400;
5const TEXT_COST = 400;
6const FILE_ANALYSIS_COST = 400;
4445const POE_MODELS = {
46imageGeneration: [
47"Flux-schnell",
48"Flux-schnell-DI",
49"ImageCreatorSD",
50"Free-GPT-Image-1"
51],
52textGeneration: [
65"Llama-3.1-8b-DI"
66],
67imageAnalysis: [
68"Qwen3-235B-A22B",
69"Gemini-1.5-Flash",
118119function selectOptimalTokens(contentLength: number, taskType: string): number {
120if (taskType === "Image Generation") return 1024;
121if (contentLength < 100) return 1024; // Short queries
122if (contentLength < 500) return 1500; // Medium queries
130taskType: string,
131timeout: number = 15000,
132isImageGeneration: boolean = false
133): Promise<string | null> {
134try {
153const content = message?.content;
154155if (isImageGeneration && message?.attachments && message.attachments.length > 0) {
156const imageAttachment = message.attachments.find(att =>
157att.content_type && att.content_type.startsWith('image/')
158);
159if (imageAttachment && imageAttachment.url) {
160return imageAttachment.url;
161}
162}
175taskType: string,
176timeout: number = 15000,
177isImageGeneration: boolean = false
178): Promise<string | null> {
179// Try first 2 models in parallel for speed
187for (const model of parallelModels) {
188promises.push(
189callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration)
190.then(result => ({ result, model, keyIndex }))
191);
203console.log(`Success with ${successful.value.model} (API key ${successful.value.keyIndex + 1})`);
204
205if (isImageGeneration) {
206const urlMatch = successful.value.result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
207if (urlMatch) {
208send("replace_response", {
209text: `π¨ **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n`
210});
211return urlMatch[0];
232for (const model of remainingModels) {
233for (let keyIndex = 0; keyIndex < POE_API_KEYS.length; keyIndex++) {
234const result = await callSinglePoeModel(model, prompt, keyIndex, taskType, timeout, isImageGeneration);
235if (result) {
236if (isImageGeneration) {
237const urlMatch = result.match(/https?:\/\/[^\s]+\.(jpg|jpeg|png|gif|webp)/i);
238if (urlMatch) {
239send("replace_response", {
240text: `π¨ **${taskType} by Gemini-2.5-Pro-Omni completed**\n\n`
241});
242return urlMatch[0];
260}
261262async function imageToBase64(imageUrl: string): Promise<{ data: string; mimeType: string }> {
263try {
264const response = await fetch(imageUrl, { timeout: 8000 });
265if (!response.ok) {
266throw new Error(`Failed to fetch image: ${response.status}`);
267}
268const arrayBuffer = await response.arrayBuffer();
269const buffer = Buffer.from(arrayBuffer);
270const mimeType = response.headers.get('content-type') || 'image/jpeg';
271return { data: buffer.toString('base64'), mimeType: mimeType };
272} catch (error) {
273console.error('Error converting image to base64:', error);
274throw error;
275}
281send: SendEventFn,
282taskType: string,
283imageUrl?: string
284): Promise<string | null> {
285try {
287
288let parts: any[] = [{ text: prompt }];
289if (imageUrl) {
290const { data: imageBase64, mimeType } = await imageToBase64(imageUrl);
291parts.push({
292inline_data: {
293mime_type: mimeType,
294data: imageBase64
295}
296});
338}
339340async function generateImage(prompt: string, send: SendEventFn): Promise<void> {
341let cleanPrompt = prompt;
342if (cleanPrompt.endsWith('--image')) {
343cleanPrompt = cleanPrompt.substring(0, cleanPrompt.length - 7).trim();
344}
345346const imagePrompt = `Detailed ${cleanPrompt}`;
347send("text", { text: `π¨ Generating image...` });
348349const result = await callPoeModelParallel(
350POE_MODELS.imageGeneration,
351imagePrompt,
352send,
353"Image Generation",
35415000,
355true
358if (!result) {
359send("error", {
360text: `β Image generation failed: All models exhausted.`,
361allow_retry: true
362});
436}
437438async function analyzeImage(imageUrl: string, userPrompt: string, send: SendEventFn): Promise<void> {
439let analysisPrompt: string;
440if (!userPrompt || userPrompt.trim().length === 0) {
441analysisPrompt = `Analyze this image in detail. Provide a comprehensive analysis including what you see, colors, objects, people, text, context, and any other relevant details.`;
442} else {
443analysisPrompt = `${userPrompt}`;
444}
445446send("text", { text: `π Analyzing image...` });
447448// Try Gemini Pro with vision first
449const geminiResult = await callGeminiApi(GEMINI_VISION_CONFIG, analysisPrompt, send, "Image Analysis", imageUrl);
450if (geminiResult) return;
451452// Fallback to Poe models with URL reference
453const fallbackPrompt = `Analyze image: ${imageUrl}\n\nUser's request: ${userPrompt || "Provide detailed analysis"}`;
454const poeResult = await callPoeModelParallel(
455POE_MODELS.imageAnalysis,
456fallbackPrompt,
457send,
458"Image Analysis",
45915000
460);
462if (!poeResult) {
463send("error", {
464text: `β Image analysis failed: All models exhausted.`,
465allow_retry: true
466});
509}
510511if (cleanContent.endsWith('--image')) {
512return { intent: 'image_generation', useClaudeModels };
513}
514518519if (hasAttachments) {
520if (lowerContent.includes('image') || lowerContent.includes('picture') ||
521lowerContent.includes('photo') || lowerContent.includes('analyze') ||
522lowerContent.includes('what') || lowerContent.includes('describe')) {
523return { intent: 'image_analysis', useClaudeModels };
524}
525return { intent: 'file_analysis', useClaudeModels };
526}
527528if (lowerContent.includes('generate image') || lowerContent.includes('create image') ||
529lowerContent.includes('draw') || lowerContent.includes('picture of') ||
530lowerContent.includes('image of')) {
531return { intent: 'image_generation', useClaudeModels };
532}
533563try {
564switch (intent) {
565case 'image_generation':
566await generateImage(userContent, send);
567break;
568590break;
591592case 'image_analysis':
593if (attachments.length > 0) {
594const imageAttachment = attachments.find(att =>
595att.content_type && att.content_type.startsWith('image/')
596);
597if (imageAttachment && imageAttachment.url) {
598await analyzeImage(imageAttachment.url, userContent, send);
599} else {
600send("error", {
605} else {
606send("error", {
607text: "Please attach an image for analysis.",
608allow_retry: false,
609});
652const rateCard = "| Task Type | Price |\n" +
653"|-----------|-------|\n" +
654`| Input (image) | ${IMAGE_COST} points/message |\n` +
655`| Input (file) | ${FILE_ANALYSIS_COST} points/message |\n` +
656`| Input (text) | ${TEXT_COST} points/message |\n` +
657`| Output (search) | ${SEARCH_COST} points/message |\n` +
658`| Output (image) | ${IMAGE_COST} points/message |\n`;
659660return {
dotcomGoogol.tsx1 match
68</a>{" "}
69right there on Google Domains for just $12 at 1:20am (really conjuring
70the hooded hacker image in the middle of the night). He owned it for all
71of one minute before Google reversed the transaction. Google{" "}
72<a href="https://security.googleblog.com/2016/01/google-security-rewards-2015-year-in.html">
574<meta charset="UTF-8">
575<meta name="viewport" content="width=device-width, initial-scale=1.0">
576<link rel="icon" type="image/png" href="https://labspace.ai/ls2-circle.png" />
577<title>Zoom RTMS Test App</title>
578<meta property="og:title" content="Zoom RTMS Test App" />
579<meta property="og:description" content="Test application for Zoom Real-Time Messaging Service OAuth integration" />
580<meta property="og:image" content="https://yawnxyz-og.web.val.run/img?link=https://yawnxyz-boink.web.val.run&title=Zoom+RTMS+Test&subtitle=Test+app+for+Zoom+OAuth+integration" />
581<meta property="og:url" content="https://yawnxyz-boink.web.val.run/" />
582<meta property="og:type" content="website" />
583<meta name="twitter:card" content="summary_large_image" />
584<meta name="twitter:title" content="Zoom RTMS Test App" />
585<meta name="twitter:description" content="Test application for Zoom Real-Time Messaging Service OAuth integration" />
586<meta name="twitter:image" content="https://yawnxyz-og.web.val.run/img?link=https://yawnxyz-boink.web.val.run&title=Zoom+RTMS+Test&subtitle=Test+app+for+Zoom+OAuth+integration" />
587<script src="https://cdn.tailwindcss.com"></script>
588<script src="https://unpkg.com/dexie@3.2.2/dist/dexie.js"></script>
zoomtest.cursorrules2 matches
178179- **Redirects:** Use `return new Response(null, { status: 302, headers: { Location: "/place/to/redirect" }})` instead of `Response.redirect` which is broken
180- **Images:** Avoid external images or base64 images. Use emojis, unicode symbols, or icon fonts/libraries instead
181- **AI Image:** To inline generate an AI image use: `<img src="https://maxm-imggenurl.web.val.run/the-description-of-your-image" />`
182- **Storage:** DO NOT use the Deno KV module for storage
183- **Browser APIs:** DO NOT use the `alert()`, `prompt()`, or `confirm()` methods
basic-html-starterindex.html1 match
1112<!-- reference the webpage's favicon. note: currently only svg is supported in val town files -->
13<link rel="icon" href="/favicon.svg" sizes="any" type="image/svg+xml">
1415<!-- import the webpage's javascript file -->
nabanhotelmain.ts1 match
11<style>body { font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial; }</n/style>
12<style>
13.hero-bg { background-image: linear-gradient(90deg, rgba(2,6,23,0.55), rgba(2,6,23,0.35)), url('https://images.unsplash.com/photo-1501117716987-c8e2f7a1b1a7?auto=format&fit=crop&w=1600&q=60'); background-size: cover; background-position: center; }
14.gallery-img { background-size: cover; background-position: center; }
15</style>
campanhapsdalcoframain.ts4 matches
93profissao: "Profissional de Seguros",
94localidade: "Oliveira de Frades",
95foto: "https://i.postimg.cc/L6ckF9GG/cropped-circle-image-2.png",
96},
97{
99profissao: "Programador InformΓ‘tico",
100localidade: "Agros-Alcofra",
101foto: "https://i.postimg.cc/vTVHLzP2/cropped-circle-image-1.png",
102},
103{
105profissao: "Auxiliar Educativa",
106localidade: "Ribeira-Alcofra",
107foto: "https://i.postimg.cc/NMVjHVxr/cropped-circle-image.png",
108},
109];
697<meta name="viewport" content="width=device-width, initial-scale=1.0">
698<script src="https://cdn.tailwindcss.com"></script>
699<link rel="icon" href="https://upload.wikimedia.org/wikipedia/commons/thumb/8/82/Flag_of_the_Social_Democratic_Party_%28Portugal%29.svg/1200px-Flag_of_the_Social_Democratic_Party_%28Portugal%29.svg.png" type="image/png" />
700<style>
701</style>