Search

Results include substring matches and semantically similar vals. Learn more
adjacent avatar
telegramDalleBot
@adjacent
Telegram DALLE Bot A personal telegram bot you can message to create images with OpenAI's DALLE ✨ Set up yours fork this val speak to telegram’s https://t.me/botfather to create a bot and obtain a bot token set the bot token as a val town secret called telegramDalleBotToken add a random string as a val town secret called telegramDalleBotWebhookSecret set up your webhook with telegram like this: // paste and run this in your workspace on here @vtdocs.telegramSetWebhook(@me.secrets.telegramDalleBotToken, { url: /* your fork's express endpoint (click the three dots on a val) */, allowed_updates: ["message"], secret_token: @me.secrets.telegramDalleBotWebhookSecret, }); message your bot some prompts! (if you get stuck, you can refer to the telegram echo bot guide from docs.val.town)
HTTP
# Telegram DALLE Bot
A personal telegram bot you can message to create images with OpenAI's [DALLE](https://openai.com/dall-e-2) ✨
![DALLE: A Macintosh II sitting on a desk, painted by Picasso in his blue period.](https://i.imgur.com/uJrP5mE.png)
try {
const imageURL = (await textToImageDalle(
process.env.openai,
text,
1,
chen avatar
twitterAlert
@chen
Daily Twitter "Important Updates" Digest You like getting important updates from Twitter—new projects or writing or companies to learn about. But you don't like being addicted to the feed constantly. This val lets you get daily updates from specific people you want to follow closely. It uses AI to filter out random shitposts and only get the important updates. 1. Authentication You'll need a Twitter Bearer Token. Follow these instructions to get one. Unfortunately it costs $100 / month to have a Basic Twitter Developer account. If you subscribe to Val Town Pro, you can ask Steve Krouse to borrow his token. Also rate limits seem really severe which limits how useful this is :( Need to figure out workarounds... 2. Query Update the list of usernames to people you care about; change the AI prompt if you want different filtering. 3. Notification Sends a daily email. Todos: this should filter the twitter API call to only tweets since the last run. some kind of caching to avoid rate limiting would be nice to use the user's feed instead of a username list... but not sure how easy that is
Cron
import { email } from "https://esm.town/v/std/email?v=12";
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
// "sliminality",
const openai = new OpenAI();
export async function twitterAlert({ lastRunAt }: Interval) {
async function filterTweets(tweets) {
const completion = await openai.chat.completions.create({
messages: [
iamseeley avatar
convertResume
@iamseeley
convert your resume content to the json resume standard
HTTP (deprecated)
event.preventDefault();
const resumeContent = document.getElementById('resumeContent').value;
const apiKey = '${Deno.env.get("OPENAI_API_KEY")}';
const spinner = document.getElementById('spinner');
const jsonOutput = document.getElementById('jsonOutput');
dctalbot avatar
pirateTalk
@dctalbot
A Slack bot which rephrases messages in a channel in the voice of a Pirate. Originally built for National Talk Like a Pirate Day, September 19, 2024. https://dctalbot.nyc/blog/pirate-talk/
HTTP (deprecated)
import { OpenAI } from "https://esm.town/v/std/openai";
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON?v=41";
const openai = new OpenAI();
const ok = new Response(undefined, { status: 200 });
async function ahoy(prompt: string): Promise<string> {
const completion = await openai.chat.completions.create({
messages: [
yawnxyz avatar
imageDownSizer
@yawnxyz
Image downsizer and uploader
HTTP (deprecated)
import { fileToDataURL } from "https://esm.town/v/stevekrouse/fileToDataURL";
import { modifyImage } from "https://esm.town/v/stevekrouse/modifyImage";
import { chat } from "https://esm.town/v/stevekrouse/openai";
import { Hono } from "npm:hono@3";
function esmTown(url) {
ikbear avatar
twitterAlert
@ikbear
Daily Twitter "Important Updates" Digest You like getting important updates from Twitter—new projects or writing or companies to learn about. But you don't like being addicted to the feed constantly. This val lets you get daily updates from specific people you want to follow closely. It uses AI to filter out random shitposts and only get the important updates. 1. Authentication You'll need a Twitter Bearer Token. Follow these instructions to get one. Unfortunately it costs $100 / month to have a Basic Twitter Developer account. If you subscribe to Val Town Pro, you can ask Steve Krouse to borrow his token. Also rate limits seem really severe which limits how useful this is :( Need to figure out workarounds... 2. Query Update the list of usernames to people you care about; change the AI prompt if you want different filtering. 3. Notification Sends a daily email. Todos: this should filter the twitter API call to only tweets since the last run. some kind of caching to avoid rate limiting would be nice to use the user's feed instead of a username list... but not sure how easy that is
Cron
import { email } from "https://esm.town/v/std/email?v=12";
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
// "sliminality",
const openai = new OpenAI();
export async function twitterAlert({ lastRunAt }: Interval) {
async function filterTweets(tweets) {
const completion = await openai.chat.completions.create({
messages: [
yawnxyz avatar
nighthawks
@yawnxyz
This is nighthawks an experimental NPC character generator that remembers details about conversations. Import this into other workflows for now; a UI is coming soon!
Script
const characterModel = new ModelProvider({
id: `${characterName}`,
// for web search / tool use, use openai
provider: 'openai',
model: 'gpt-4o',
// provider: 'groq',
nicosuave avatar
databaseRunner
@nicosuave
An interactive, runnable TypeScript val by nicosuave
HTTP (deprecated)
const fileResponses = await Promise.all(chunks.map((chunk, index) => createGzipFile(chunk, index, gzip, introspect)));
console.log(`Created ${fileResponses.length} ${gzip ? "gzip" : ""} files`);
return new Response(JSON.stringify({ openaiFileResponse: fileResponses }), {
status: 200,
headers: { "Content-Type": "application/json" },
movienerd avatar
randomMovieQuiz
@movienerd
@jsxImportSource https://esm.sh/react
HTTP
if (request.url.endsWith("/new-game")) {
const { OpenAI } = await import("https://esm.town/v/std/openai");
const openai = new OpenAI();
const correctMovie = movies[Math.floor(Math.random() * movies.length)];
`Give a rhyming vague description of the movie "${correctMovie}" without mentioning any character names, actor names, o
const completion = await openai.chat.completions.create({
messages: [{ role: "user", content: prompt }],
guidoism avatar
hackerNewsAuthors
@guidoism
An interactive, runnable TypeScript val by guidoism
Script
"worrydream", // Bret Victor (dynamicland)
"stevewoz", // Steve Wozniak (apple)
"sama", // Sam Altman (openai, yc)
"geoff", // Geoff Ralston (yc)
"dang", // Dan G (hn)
vtdocs avatar
browserlessScrapeExample
@vtdocs
An interactive, runnable TypeScript val by vtdocs
Script
method: "POST",
body: JSON.stringify({
"url": "https://en.wikipedia.org/wiki/OpenAI",
"elements": [{
// The second <p> element on the page
ttodosi avatar
infiniteSVGGraph
@ttodosi
Infinite SVG Graph A connected graph of AI-generated SVG images. Ask it to make any kind of SVG. Add your contribution to the graph. Make it POP!
HTTP
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite?v=6";
app.post("/remix/:id", async (c) => {
const openai = new OpenAI();
const { prompt } = await c.req.json();
if (svg === undefined) return c.text("Not found", 404);
const stream = await openai.chat.completions.create({
messages: [
rkartzman avatar
twitterAlert
@rkartzman
Daily Twitter "Important Updates" Digest You like getting important updates from Twitter—new projects or writing or companies to learn about. But you don't like being addicted to the feed constantly. This val lets you get daily updates from specific people you want to follow closely. It uses AI to filter out random shitposts and only get the important updates. 1. Authentication You'll need a Twitter Bearer Token. Follow these instructions to get one. Unfortunately it costs $100 / month to have a Basic Twitter Developer account. If you subscribe to Val Town Pro, you can ask Steve Krouse to borrow his token. Also rate limits seem really severe which limits how useful this is :( Need to figure out workarounds... 2. Query Update the list of usernames to people you care about; change the AI prompt if you want different filtering. 3. Notification Sends a daily email. Todos: this should filter the twitter API call to only tweets since the last run. some kind of caching to avoid rate limiting would be nice to use the user's feed instead of a username list... but not sure how easy that is
Cron
import { email } from "https://esm.town/v/std/email?v=12";
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
// "sliminality",
const openai = new OpenAI();
export async function twitterAlert({ lastRunAt }: Interval) {
async function filterTweets(tweets) {
const completion = await openai.chat.completions.create({
messages: [
maxm avatar
infiniteSVGGraph
@maxm
Infinite SVG Graph A connected graph of AI-generated SVG images. Ask it to make any kind of SVG. Add your contribution to the graph. Make it POP!
HTTP
import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";
import { OpenAI } from "https://esm.town/v/std/openai?v=4";
import { ResultSet, sqlite } from "https://esm.town/v/std/sqlite?v=6";
app.post("/remix/:id", async (c) => {
const openai = new OpenAI();
const { prompt } = await c.req.json();
if (svg === undefined) return c.text("Not found", 404);
const stream = await openai.chat.completions.create({
messages: [
janpaul123 avatar
valle_tmp_25273384802368385202566002443081
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const contextWindow: any = await valleGetValsContextWindow(model);
const openai = new OpenAI();
const stream = await openai.chat.completions.create({
model,