Search
tanaSave
@nbbaier
An interactive, runnable TypeScript val by nbbaier
Script
const token = Deno.env.get("tanaInputAPI");
export const tanaSave = async (req: Request) => {
const app = new Hono();
app.get("/save", async c => {
let { text, url } = c.req.query();
const payload: APIPlainNode = {
name: text,
children: [
{ name: "child 1" },
{ type: "field", attributeId: "cwi23sOzRSh8" },
apparentRedAphid
@jeffreyyoung
An interactive, runnable TypeScript val by jeffreyyoung
HTTP
events,
forward,
PoeBotServerSentEvent,
QueryRequest,
sleep,
} from "https://esm.town/v/jeffreyyoung/poe_bot";
export default bot({
async *handleMessage(query, { req }) {
yield "<query>\n";
yield query.query.at(-1)?.content;
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
falSDXLExample
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
HTTP
import * as fal from "npm:@fal-ai/serverless-client";
fal.config({
// Can also be auto-configured using environment variables:
credentials: Deno.env.get("FAL_KEY"),
const prompt = "a cute and happy dog";
const result: any = await fal.run("fal-ai/fast-lightning-sdxl", { input: { prompt } });
export default () => html(`<img src="${result.images[0].url}" />`);
myApi
@thedro
An interactive, runnable TypeScript val by thedro
Script
export const myApi = ((input) => {
var inner = (name) => {
return "hello " + name;
console.log(inner("What"));
console.log(inner);
return { inner, value: "one", output: inner("sup") };
// return async () => {
// inner(input);
![yawnxyz avatar](https://images.clerk.dev/oauth_github/img_2NnaHhpxNuH1xWRIRjQNoo16TVc.jpeg)
ragwithclaude_ui
@yawnxyz
Wanted to build a UI for Simon's thing but he locked it lol
HTTP
Wanted to build a UI for Simon's thing but he locked it lol
/** @jsx jsx **/
// rag with claude ui
// https://simonw-ragwithclaude.web.val.run/?question=what%20is%20shot%20scraper
const app = new Hono();
const Page = () => (
<html lang="en">
<head>
<title>Simple HTMX Example</title>
<script src="https://unpkg.com/htmx.org@1.9.9"></script>
creative_upscaler
@fal
Creative Upscaler link to val - https://www.val.town/v/fal/creative_upscaler Usage const upscaledImage = @fal.creative_upscaler("an owl", "https://storage.googleapis.com/falserverless/model_tests/upscale/owl.png") Usage import fal from "npm:@fal-ai/serverless-client";
const result = await fal.subscribe("fal-ai/creative-upscaler", {
input: {
prompt: "an owl",
image_url: "https://storage.googleapis.com/falserverless/model_tests/upscale/owl.png",
},
logs: true,
onQueueUpdate: (update) => {
if (update.status === "IN_PROGRESS") {
update.logs.map((log) => log.message).forEach(console.log);
}
},
}); https://www.fal.ai/models/creative-upscaler
Script
## Creative Upscaler
link to val - https://www.val.town/v/fal/creative_upscaler
### Usage
```js
const upscaledImage = @fal.creative_upscaler("an owl", "https://storage.googleapis.com/falserverless/model_tests/upscale/owl.png")
### Usage
export let creativeUpscaler = async (
prompt: string,
image_url: string,
creativity: number = 0.5,
sentryTesting
@nbbaier
// app.post("/tunnel", async (c) => {
HTTP
const app = new Hono();
const SENTRY_KEY = Deno.env.get("SENTRY_KEY") as string;
const SENTRY_HOST = Deno.env.get("SENTRY_HOST") as string;
const SENTRY_PROJECT_ID = Deno.env.get("SENTRY_PROJECT_ID") as string;
const jsEndpoint = "sentry.js";
app.get("/", c =>
c.html(html`<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
apiExample
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { runVal } from "https://esm.town/v/std/runVal";
export const apiExample = runVal("patrickjm.gpt3", {
prompt: "write me a limerick about sandboxing javascript",
![impedivity avatar](https://images.clerk.dev/oauth_github/img_2SP5lxtmSeo4Ov6qqipxXTDzu4h.png)
honoTanaEndpoint
@impedivity
An interactive, runnable TypeScript val by impedivity
HTTP
const token = Deno.env.get("tanaInputAPI");
export const honoTanaEndpoint = async (req: Request) => {
const app = new Hono();
app.get("/", async (c) => {
let { text, url } = c.req.query();
console.log(c.req);
const payload: APIPlainNode = {
name: text,
children: [
// type: "field",
examplebotendpoint
@mattx
An interactive, runnable TypeScript val by mattx
Express (deprecated)
export let examplebotendpoint = async (req: Request) => {
const headers = { "Content-type": "application/json" };
const text = await req.text();
const body = JSON.parse(text);
if (
!req.headers.get("X-Signature-Timestamp") ||
!req.headers.get("X-Signature-Ed25519")
return Response.json({ error: "bad request" }, { status: 400 });
const verified = await verify_discord_signature(
process.env.discord_pubkey,
![yawnxyz avatar](https://images.clerk.dev/oauth_github/img_2NnaHhpxNuH1xWRIRjQNoo16TVc.jpeg)
audioManagerRunner
@yawnxyz
An interactive, runnable TypeScript val by yawnxyz
Script
import { AudioManager } from "https://esm.town/v/yawnxyz/audioManager";
let audio = new AudioManager();
let joke = await ai("tell me a joke about bacteriophages!");
console.log('text', joke)
let result = await audio.textToSpeechUpload(joke, {key: "random-joke.mp3"});
console.log('result:', result)
nasaAPOD
@baiheinet
// Returns NASA's Astronomy Picture of the Day (APOD)
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
// Returns NASA's Astronomy Picture of the Day (APOD)
export const nasaAPOD = fetchJSON("cutt.ly/T7ksirK");
// Forked from @iBrokeit.nasaAPOD
![stevekrouse avatar](https://images.clerk.dev/uploaded/img_2PqHa2Gsy93xQrjh2w78Xu0cChW.jpeg)
PaLM
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import process from "node:process";
export const PaLM = (async () => {
const { default: PalmAI } = await import("npm:palmai");
const palm = new PalmAI(process.env.palmai_key);
extraordinaryMaroonCow
@jeffreyyoung
An interactive, runnable TypeScript val by jeffreyyoung
HTTP
const basePrompt =
`Generate an image generation model prompt (description) for the previous image, in Barbie or Ken toy style
Be extremely detailed in describing:
- Hair color
- Poses and expressions
- Gender
- Clothing details and materials
- Skin tone
- Race
- Exact color schemes