Search

Results include substring matches and semantically similar vals. Learn more
Projects are not included in search results. Re-try your query with our new search.
ajax avatar
blah
@ajax
An interactive, runnable TypeScript val by ajax
HTTP
export default async function server(request: Request): Promise<Response> {
const blahConfig = {
"name": "valtown-testing",
"version": "1.0.0",
"alias": "sample-tools",
"description": "A sample blah manifest demonstrating various tool types and configurations.",
"env": {
"OPENAI_API_KEY": Deno.env.get("OPENAI_API_KEY"),
"tools": [
"name": "hello_name",
yawnxyz avatar
wecrispr
@yawnxyz
// Function to fetch and encode an external image
HTTP
const app = new Hono();
// Function to fetch and encode an external image
async function fetchAndEncodeImage(url) {
try {
const response = await fetch(url);
if (!response.ok) {
throw new Error(`Failed to fetch image: ${response.status} ${response.statusText}`);
const arrayBuffer = await response.arrayBuffer();
const uint8Array = new Uint8Array(arrayBuffer);
return base64Encode(uint8Array);
stevekrouse avatar
blackRodent
@stevekrouse
@jsxImportSource https://esm.sh/hono@latest/jsx
HTTP
/** @jsxImportSource https://esm.sh/hono@latest/jsx **/
export const projects = (c: Context) => {
return c.html(
<html>
<head>
<title>Projects</title>
<style
dangerouslySetInnerHTML={{
__html:
`:root{--slate1: hsl(200, 7%, 8.8%);--slate2: hsl(195, 7.1%, 11%);--slate3: hsl(197, 6.8%, 13.6%);--slate4: h
yawnxyz avatar
dynamicFormInput
@yawnxyz
An interactive, runnable TypeScript val by yawnxyz
HTTP
/** @jsx jsx */
const app = new Hono();
const Layout = ({ children, title = "Dynamic Form Example" }) => (
<html lang="en">
<head>
<title>{title}</title>
<script src="https://unpkg.com/htmx.org@1.9.9"></script>
</head>
<body>
{children}
yawnxyz avatar
ai
@yawnxyz
An http and class wrapper for Vercel's AI SDK Usage: Groq: https://yawnxyz-ai.web.val.run/generate?prompt="tell me a beer joke"&provider=groq&model=llama3-8b-8192 Perplexity: https://yawnxyz-ai.web.val.run/generate?prompt="what's the latest phage directory capsid & tail article about?"&provider=perplexity Mistral: https://yawnxyz-ai.web.val.run/generate?prompt="tell me a joke?"&provider=mistral&model="mistral-small-latest" async function calculateEmbeddings(text) { const url = `https://yawnxyz-ai.web.val.run/generate?embed=true&value=${encodeURIComponent(text)}`; try { const response = await fetch(url); const data = await response.json(); return data; } catch (error) { console.error('Error calculating embeddings:', error); return null; } }
HTTP
An http and class wrapper for Vercel's AI SDK
Usage:
- Groq: `https://yawnxyz-ai.web.val.run/generate?prompt="tell me a beer joke"&provider=groq&model=llama3-8b-8192`
- Perplexity: `https://yawnxyz-ai.web.val.run/generate?prompt="what's the latest phage directory capsid & tail article about?
- Mistral: `https://yawnxyz-ai.web.val.run/generate?prompt="tell me a joke?"&provider=mistral&model="mistral-small-latest"`
async function calculateEmbeddings(text) {
// import { z } from "npm:zod";
// import { nanoid } from 'npm:nanoid';
const URL = "https://yawnxyz-coversheetai.web.val.run"
const taskPrefix = "task::ai:"
tempdev avatar
scarletSole
@tempdev
An interactive, runnable TypeScript val by tempdev
HTTP
interface Context {
url: string;
const app = new Hono();
app.get("/dood/:dood", async (c) => {
const { dood } = c.req.param();
const ctx = { url: "https://d000d.com/e/" + dood };
return c.json(await doodstream(ctx));
app.get("/tape/:tape", async (c) => {
const { tape } = c.req.param();
const ctx = { url: "https://streamtape.com/e/" + tape };
tempguy avatar
scarletSole
@tempguy
An interactive, runnable TypeScript val by tempguy
HTTP
interface Context {
url: string;
const app = new Hono();
app.get("/dood/:dood", async (c) => {
const { dood } = c.req.param();
const ctx = { url: "https://d000d.com/e/" + dood };
return c.json(await doodstream(ctx));
app.get("/tape/:tape", async (c) => {
const { tape } = c.req.param();
const ctx = { url: "https://streamtape.com/e/" + tape };
tfayyaz avatar
searchmessages
@tfayyaz
@jsxImportSource npm:hono/jsx
HTTP
/** @jsxImportSource npm:hono/jsx **/
// import val sqlite
const app = new Hono();
const title = "Click Button Demo";
const View = ({ rows }) => {
// create search form
// create html table from all rows
return (
<html>
<head>
janpaul123 avatar
valleBlogV0
@janpaul123
Fork this val to your own profile. Create a Val Town API token , open the browser preview of this val, and use the API token as the password to log in.
HTTP
* Fork this val to your own profile.
* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API tok
async function main(req: Request): Promise<Response> {
const { readable, writable } = new TransformStream();
const writer = writable.getWriter();
const write = (text) => writer.write(new TextEncoder().encode(text));
(async () => {
write(`<!DOCTYPE html>
<html>
<head><link href="https://unpkg.com/tailwindcss@^2/dist/tailwind.min.css" rel="stylesheet" /></head>
tempdev avatar
compactBlushGrasshopper
@tempdev
An interactive, runnable TypeScript val by tempdev
Script
let BASEDOM = "";
interface Servers {
name: string | null;
dataHash: string | null;
interface APIResponse {
name: string | null;
image: string | null;
mediaId: string | null;
stream: string | null;
referer: string;
stevekrouse avatar
html
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
export let html = (content, options = {}) =>
new Response(content, {
headers: {
"Content-Type": "text/html",
...(options.headers ?? {}),
yawnxyz avatar
monacoEditor
@yawnxyz
An interactive, runnable TypeScript val by yawnxyz
HTTP
const app = new Hono();
app.get('/', (c) => {
const html = `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Monaco Editor with Hono</title>
<style>
tempdev avatar
flix
@tempdev
@jsxImportSource npm:hono/jsx
HTTP
/** @jsxImportSource npm:hono/jsx */
CMDBResponse,
episodeHandler,
play,
search,
seasonHandler,
ServerResponse,
StreamResponse,
watch,
} from "https://esm.town/v/tempdev/backend";
dhvanil avatar
web_0NANERhZE0
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function web_0NANERhZE0(req) {
return new Response(`<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Retro Space Interface</title>
<style>
body {
margin: 0;
dhvanil avatar
val_K1OL6VfLJs
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_K1OL6VfLJs(req) {
try {
// Execute the code directly and capture its result
const result = await (async () => {
const visualizeData = (data) => { const canvas = document.createElement('canvas'); const ctx = canvas.getContext(
// Return the result in a properly formatted response
return new Response(JSON.stringify({
result: result,
type: typeof result
headers: { 'Content-Type': 'application/json' }