1import { fetch } from "https://esm.town/v/std/fetch";
2
3export async function getWeather(city: string) {
4 try {
5 const response = await fetch(`https://wttr.in/${city}?format=j1`);
2import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
3
4export async function testMutateSemantics({
5 stateName,
6 api,
3
4// https://stevekrouse-chatgptplugin.express.val.run/.well-known/ai-plugin.json
5export async function chatGPTPlugin(req: express.Request, res: express.Response) {
6 if (req.path === "/.well-known/ai-plugin.json") {
7 res.json({
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function openaiFineTune({ key, model, trainingFile }: {
4 key: string;
5 model?: string;
1export function parseSendGridEmail(input) {
2 function parseString(input) {
3 if (typeof input === "string") {
4 // parse email out of format like 'name <email@email.com>'
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2
3export function resend({ from, to, subject, html, text, apiKey }: {
4 from: string;
5 to: string;
1export function signECDSA(message, key) {
2 let encoded = new TextEncoder().encode(message);
3 return crypto.subtle.sign(
3import { verifyAPIAuth } from "https://esm.town/v/stevekrouse/verifyAPIAuth";
4
5export async function updateInspoList(newList, auth) {
6 let handle = await verifyAPIAuth(auth);
7 if (isValTownTeam(handle)) {
1export function generic<A>(
2 arr: A[],
3 criteria: (a: A) => string
2import { messages } from "https://esm.town/v/stevekrouse/messages";
3
4export function notifyNewMessages() {
5 if (messages.length > messagesLengthLast)
6 console.email(
A helper function to build a file's email
Simple functional CSS library for Val Town
import { OpenAI } from "https://esm.town/v/std/openai";
export default async function(req: Request): Promise<Response> {
if (req.method === "OPTIONS") {
return new Response(null, {
headers: {
"Access-Control-Allow-Origin": "*",
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.