7const cacheKey = location => "easyAQI_locationID_cache_" + encodeURIComponent(location);
8
9export async function easyAQI({ location }: {
10 location: string;
11}) {
7const cacheKey = location => "easyAQI_locationID_cache_" + encodeURIComponent(location);
8
9export async function easyAQI({ location }: {
10 location: string;
11}) {
94};
95
96async function handler(req: Request): Promise<Response> {
97 const url = new URL(req.url);
98 if (req.method === "GET" && url.pathname === "/event") {
31console.log(text);
32
33export async function weatherGPT() {
34 await email({ subject: "Weather Today", text });
35}
10const dimensions = 1536;
11
12export default async function semanticSearchPublicVals(query) {
13 const allValsBlobEmbeddingsMeta = (await blob.getJSON(`allValsBlob${dimensions}EmbeddingsMeta`)) ?? {};
14 const allBatchDataIndexes = _.uniq(Object.values(allValsBlobEmbeddingsMeta).map((item: any) => item.batchDataIndex));
70};
71
72function createArrayOfLength(length: number): number[] {
73 return Array.from(Array(length === 0 ? 1 : length), (_, i) => i);
74}
79 * noise range to fit the 0 to 1 scale we need.
80 */
81function getColorByNoise(colors: string[], noise: number) {
82 return colors[Math.floor(((noise + 1) / 2) * colors.length)];
83}
2import { form } from "https://esm.town/v/curtcox/command_processor_test_form";
3
4async function process(command: string): Promise<string> {
5 const result = await command_processor(command);
6 return result.output.content;
7}
8
9export default async function(req: Request): Promise<Response> {
10 return form(req, process);
11}
8import { useState } from "https://esm.sh/react@18.2.0";
9
10export function App() {
11 const [ count, setCount ] = useState(0)
12 return (
1export default function({ component, sourceURL, head }: { component: Function; sourceURL: string; head?: string }) {
2 return new Response(
3 `<html>
7import { ObjectInspector } from "https://esm.sh/react-inspector";
8
9async function fetchGgufMetadata(url: string) {
10 const { metadata, tensorInfos } = await gguf(url);
11 return { metadata, tensorInfos };
12}
13
14function Counter() {
15 const [counter, setCounter] = React.useState(0);
16
26}
27
28export function App() {
29 return (
30 <>
Simple functional CSS library for Val Town
A helper function to build a file's email
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.