1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
1import { discordAPI } from "https://esm.town/v/stevekrouse/discordAPI";
2
3// https://discord.com/developers/docs/resources/guild#get-guild-channels
4export let discordGetChannels = ({token, tokenType, guildId}) => discordAPI({
5 token,
6 tokenType,
1import { testMutateSemantics } from "https://esm.town/v/stevekrouse/testMutateSemantics";
2
3export const unauthenticatedCantMutate = (api) =>
4 testMutateSemantics({
5 stateName: "@stevekrouse.testState",
6 api,
7 mutateExpected: false,
8 mutator: (now) => `@stevekrouse.testState = ${now}`,
5 console.log(
6 await fetchText(
7 "https://api.val.town/v1/run/stevekrouse.id",
8 {
9 method: "POST",
15 console.log(
16 await fetchText(
17 "https://api.val.town/v1/run/stevekrouse.id",
18 {
19 method: "POST",
27 console.log(
28 await fetchText(
29 "https://api.val.town/v1/run/stevekrouse.id",
30 {
31 method: "POST",
3// Random math fact
4export let mathFact = fetchText(
5 "http://numbersapi.com/random/math"
6);
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
20 const questionChain = questionPrompt
21 .pipe(new ChatOpenAI({
22 openAIApiKey: process.env.OPENAI_API_KEY,
23 })
24 .pipe(new StringOutputParser()));
32 .pipe(
33 new ChatOpenAI({
34 openAIApiKey: process.env.OPENAI_API_KEY,
35 }),
36 )