Search
untitled_scarletPinniped
@hiteshjoshi
An interactive, runnable TypeScript val by hiteshjoshi
HTTP (deprecated)
export default async function(req: Request): Promise<Response> {
return Response.json({ ok: false });
untitled_coralChinchilla
@pujdesai
An interactive, runnable TypeScript val by pujdesai
Email
export async function untitled_coralChinchilla(email: Email) {
async function emailRandomJoke() {
async function fetchRandomJoke() {
const response = await fetch(
"<https://official-joke-api.appspot.com/random_joke>",
return response.json();
const randomJoke = await fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
return console.email(punchline, setup);
untitled_YVa34SCC
@andreterron
An interactive, runnable TypeScript val by andreterron
Script
export const untitled_YVa34SCC = 555;
untitled8294445
@cyrilis
An interactive, runnable TypeScript val by cyrilis
Script
import { gpt3 } from "https://esm.town/v/patrickjm/gpt3?v=4";
export let untitled8294445 = default (params) => {
return gpt3({
openAiKey: process.env.openai_key,
prompt: params.question,
.then((result) => result);
untitled_coffeeMacaw
@shaniehurvitz
// Fetches a random joke.
Script
export const SAMPLE_JOKE = {
"setup": "What's black and white and read all over?",
"punchline": "The newspaper.",
// Fetches a random joke.
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
return response;
const randomJoke = await fetchRandomJoke();
untitled_scarletHoverfly
@stevekrouse
An interactive, runnable TypeScript val by stevekrouse
Script
import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
export let untitled_scarletHoverfly = fetchJSON(
"https://api.val.town/v1/eval",
method: "POST",
body: JSON.stringify({
code: "let evalVal1 = @me.example1",
headers: {
Authorization: `Bearer ${process.env.valtown}`,
untitled_chocolateSquid
@jacoblee93
An interactive, runnable TypeScript val by jacoblee93
Script
export const untitled_chocolateSquid = (async () => {
const { ChatOpenAI } = await import(
"https://esm.sh/langchain@0.0.146/chat_models/openai"
const { LLMChain } = await import("https://esm.sh/langchain@0.0.146/chains");
const { ChatPromptTemplate } = await import(
"https://esm.sh/langchain@0.0.146/prompts"
const template =
"You are a helpful assistant that translates {input_language} to {output_language}.";
const humanTemplate = "{text}";
const chatPrompt = ChatPromptTemplate.fromPromptMessages([
untitled_orangeSwallow
@deeks2115
// Fetches a random joke.
Cron
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
return response.json();
const randomJoke = await fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
// Sends an email with the joke.
export const emailRandomJoke = email({
untitled_crimsonFinch
@rob_ne
// Fetches a random joke.
Cron
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
return response.json();
const randomJoke = await fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
// Sends an email with the joke.
export const emailRandomJoke = email({
untitled_blushLobster
@anniepeak
// Fetches a random joke.
Cron
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
return response.json();
const randomJoke = await fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
// Sends an email with the joke.
export const emailRandomJoke = email({
untitled_emeraldChinchilla
@tejchak
// Fetches a random joke.
Cron
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
return response.json();
const randomJoke = await fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
// Sends an email with the joke.
export const emailRandomJoke = email({
untitled2342187
@byrneml
// Get news from different sources I care about
Script
// Get news from different sources I care about
export let untitled2342187 = interface LeNews {
feedlyAPI: {
name: String,
desc: String,
url: String,
export async function giveMeLeNews({ feedlyAPI }: LeNews) {
return "Works";
untitled_cyanButterfly
@jeremym3817
// Fetches a random joke.
Cron
// Fetches a random joke.
async function fetchRandomJoke() {
const response = await fetch(
"https://official-joke-api.appspot.com/random_joke",
return response.json();
return SAMPLE_JOKE;
const randomJoke = await fetchRandomJoke();
const setup = randomJoke.setup;
const punchline = randomJoke.punchline;
// Sends an email with the joke.