18 const chat = new ChatOpenAI({
19 temperature: 0,
20 openAIApiKey: process.env.OPENAI_API_KEY,
21 });
22 const chain = new LLMChain({
1export function myApi(name) {
2 return "hi " + name;
3}
2let { nameList } = await import("https://esm.town/v/acmu/nameList");
3
4export async function myApiDelete(name) {
5 if (Array.isArray(nameList)) {
6 nameList = nameList.filter((i) => i !== name);
21 }
22 const urlParams = new URLSearchParams(params);
23 const url = `https://api.are.na/v2/users/${userId}/channels` +
24 (Object.keys(params).length ? `?${urlParams.toString()}` : "");
25 const response = await fetch(url, {
14 };
15 const getCompletion = async () => {
16 const response = await fetch("https://api.openai.com/v1/chat/completions", {
17 method: "POST",
18 headers: {
4
5export let nameTopHNThreadCron = (async () => {
6 // Cheerio parses markup and provides an API to interact with the resulting data structure
7 const cheerio = await import("npm:cheerio"); // You can import NPM packages
8 const reply = await fetch("https://news.ycombinator.com/");
1export function myApi(name) {
2 return "hi " + name;
3}
1export function myApi(name) {
2 return "hi " + name;
3}
4 let pm25 = (
5 await fetchJSON(
6 "https://api.openaq.org/v2/latest?" +
7 new URLSearchParams({
8 limit: "10",
1export function myApi(name) {
2 return "hi " + name;
3}