Search

Results include substring matches and semantically similar vals. Learn more
saolsen avatar
use_example_rust_http_val
@saolsen
An interactive, runnable TypeScript val by saolsen
HTTP
import { handler } from "https://esm.town/v/saolsen/example_rust_http_val";
export default async function(req: Request): Promise<Response> {
let response = handler(req.method, req.url, await req.text());
console.log(response);
stevekrouse avatar
testSemantics
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export async function testSemantics({
stateName,
api,
dglazkov avatar
generatevoice
@dglazkov
An example of using Breadboard Board as a Service helper script. The board converts supplied text and voice into speech using Eleven Labs API. This board is marked as private , which means that it requires an additional service key to function. To use: fork this val add GEMINI_KEY to your environment variables add ELEVENLABS_API_KEY to your environment variables add BB_SERVICE_KEY to your environment variables. You can use this val to generate it. query directly or use as Service URL in the Core Kit service node.
HTTP
An example of using [Breadboard Board as a Service](https://www.val.town/v/dglazkov/bbaas) helper script. The board converts
This board is marked as `private`, which means that it requires an additional service key to function.
To use:
dhvanil avatar
val_4TWAFb0mDp
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_4TWAFb0mDp(req) {
try {
// Execute the code directly and capture its result
janpaul123 avatar
VALLErun
@janpaul123
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP
import { openai } from "npm:@ai-sdk/openai";
function parseSearchReplaceBlocks(content: string): Array<{ searchStart: string; searchEnd: string; replace: string }> {
function applySearchReplaceBlocks(
export default function(
unless strictly necessary, for example use APIs that don't require a key, prefer internal function
functions where possible. Unless specified, don't add error handling,
The val should create a "export default async function main" which is the main function that gets
// The val should create a "export default async function main() {" which
// is the main function that gets executed, without any arguments. Don't return a Response object,
const changesMessages = function({ currentCode, userprompt }: { currentCode: string; userprompt: string }) {
taras avatar
fireworks_ai_proxy
@taras
HTTP
"Access-Control-Allow-Methods": "GET, POST, PUT, DELETE, OPTIONS",
"Access-Control-Allow-Headers": "*",
function err(msg): Response {
return new Response(
JSON.stringify({
"Content-Type": "application/json",
...corsHeaders, // Spread the CORS headers
export default async function(req: Request): Promise<Response> {
const url = new URL(req.url);
const pathname = url.pathname;
case avatar
manifold_daily_loan_collector
@case
Runs daily to collect your Manifold loan! Instructions: Fork this Val. Get your Manifold API key from your profile . Add manifoldApiKey with your key to the Val Environment Variables . Hit run! It will run daily to collect your loans.
Cron
export default async function() {
const res = await fetch("https://api.manifold.markets/request-loan", {
headers: {
cufaoil avatar
myApi
@cufaoil
An interactive, runnable TypeScript val by cufaoil
HTTP
export function myApi(name) {
return "hi " + name;
jamisonl avatar
obnoxiousAmaranthCamel
@jamisonl
Bot for Cama discord server. To initialize new slash commands, you have to run a separate bit of code. This is for modifying their functionality
HTTP
mmands, you have to run a separate bit of code. This is for modifying their functionality
req.headers.get("X-Signature-Ed25519"),
req.headers.get("X-Signature-Timestamp"),
// Get the user calling this slash command
const userId = await body.member?.user?.id;
if (bank[userId] === undefined) bank[userId] = starting_amount;
onemanwenttomow avatar
myApi
@onemanwenttomow
An interactive, runnable TypeScript val by onemanwenttomow
Script
export function myApi(name) {
return "hello " + name + " πŸŽ‰";
droonkid avatar
myApi
@droonkid
An interactive, runnable TypeScript val by droonkid
Script
export function myApi(name) {
return "hi " + name;
Joelsrubin avatar
browserbasePuppeteerExample
@Joelsrubin
Browserbase Browserbase offers a reliable, high performance serverless developer platform to run, manage, and monitor headless browsers at scale. Leverage our infrastructure to power your web automation and AI agents. Get started with Browserbase for free here . If you have any questions, reach out to developer@browserbase.com.
Script
import { email as sendEmail } from "https://esm.town/v/std/email?v=9";
import puppeteer from "npm:puppeteer-core";
async function sendPDF() {
console.log("Initiating pdf sender");
const browser = await puppeteer.connect({
disposition: "attachment",
console.log("Email sent successfully");
export default async function() {
console.log("RUnning");
await sendPDF();
turbo1912 avatar
private_model
@turbo1912
@jsxImportSource https://esm.sh/react
Cron
import fal from "npm:@fal-ai/serverless-client";
import { renderToString } from "npm:react-dom/server";
export default async function(interval: Interval) {
const result = await fal.subscribe("turbo1912/multiple-models/sd", {
input: {
adamontherun avatar
myApi
@adamontherun
An interactive, runnable TypeScript val by adamontherun
Script
export function myApi(name) {
return "hi " + name;
tannerwj avatar
myApi
@tannerwj
An interactive, runnable TypeScript val by tannerwj
Script
export function myApi(name) {
return "hi " + name;