Search

Results include substring matches and semantically similar vals. Learn more
hiteshjoshi avatar
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 });
pujdesai avatar
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);
andreterron avatar
untitled_YVa34SCC
@andreterron
An interactive, runnable TypeScript val by andreterron
Script
export const untitled_YVa34SCC = 555;
cyrilis avatar
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);
shaniehurvitz avatar
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();
stevekrouse avatar
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}`,
jacoblee93 avatar
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([
deeks2115 avatar
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({
rob_ne avatar
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({
anniepeak avatar
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({
tejchak avatar
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({
byrneml avatar
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";
jeremym3817 avatar
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.
dan avatar
untitled4277444
@dan
An interactive, runnable TypeScript val by dan
Script
export let untitled4277444 = .help
andreterron avatar
untitled_greenPlanarian
@andreterron
An interactive, runnable TypeScript val by andreterron
Script
export let untitled_greenPlanarian = (() => {
throw new Error("API Error");