166},
167"redirects": {
168"https://esm.town/v/std/API_URL": "https://esm.town/v/std/API_URL?v=5",
169"https://esm.town/v/stevekrouse/sqlite": "https://esm.town/v/stevekrouse/sqlite?v=13"
170},
171"remote": {
172"https://esm.town/v/std/API_URL?v=5": "46109f905a50e32281d3ffbe7b9c8209a778290c5274d83d131fba2d26c4974d",
173"https://esm.town/v/stevekrouse/sqlite?v=13": "3b613197e9da35db335dc2726c062c61f9247439c10a0c64c118994e200ffa46"
174}
todaysGrindREADME.md2 matches
1A simple Notion-powered API to get latest entry from my Coffee Journal.
23### Usage
5- Use this Notion template for [My Coffe Journal](https://phantom-earthquake-520.notion.site/My-Coffee-Journal-Template-1b62860d4b188039bc9df196c5476969?pvs=4)
6- Update your enviroment vairables to include these keys
7- Notion Integration API Key: `NOTION_API_KEY`
8- [Coffee Journal Database ID](https://developers.notion.com/reference/retrieve-a-database): `COFFEE_TABLE_DB_ID`
dotcomanalytics.tsx2 matches
2import { DataRequest } from "https://esm.town/v/jxnblk/reactstream/index.tsx";
34const API = "https://jxnblk-api.web.val.run/visits";
56async function writeVisit(req, res) {
19};
20// console.log(req.headers);
21await fetch(API, {
22method: "POST",
23body: JSON.stringify(data),
1// RSS middleware for jxnblk.com
23// import data from "https://blog.jxnblk.com/api/all.json" with { type: "json" };
4import type { Middleware } from "https://esm.town/v/jxnblk/reactstream/index.tsx";
5
create_a_toolmain.tsx13 matches
1718// Constants
19const VALTOWN_URL = "https://api.val.town/v1";
20const VALTOWN_API_KEY = Deno.env.get("VALTOWN_API_KEY");
2122const client = new ValTown({ bearerToken: VALTOWN_API_KEY });
23// Main handler function
24export default async function handler(req: Request): Promise<Response> {
57}
5859// Validate API Key
60if (!VALTOWN_API_KEY) {
61console.error("Val Town API key is missing");
62return new Response(
63JSON.stringify({ error: "Val Town API key is not configured" }),
64{ status: 500, headers: { "Content-Type": "application/json" } },
65);
94- If the toolDescription includes example code, use it as a reference only. Ensure that your implementation is complete, polished, and self-contained.
95965. **AI API Integration (if applicable)**:
97- If the toolDescription indicates that creative enrichment or additional processing via AI is needed, integrate an AI API call into the function.
98- Import { openai } from "npm:@ai-sdk/openai" and { generateText } from "npm:ai".
99- Use the model "gpt-4o-mini".
115{
116"tool_name": "analyze_code_changes",
117"tool_implementation_description": "Create a function that receives a JSON payload with a 'recent_changes' field, processes the data using an AI API call for creative analysis, and returns a structured response with the AI-generated analysis."
118}
119---
178headers: {
179"Content-Type": "application/json",
180"Authorization": `Bearer ${VALTOWN_API_KEY}`,
181},
182body: JSON.stringify({
195JSON.stringify({
196error: "Authentication failed",
197message: "Invalid or expired Val Town API key",
198}),
199{ status: 401, headers: { "Content-Type": "application/json" } },
258headers: {
259"Content-Type": "application/json",
260"Authorization": `Bearer ${VALTOWN_API_KEY}`,
261},
262});
11},
12{
13"prompt": "weather dashboard for nyc using open-meteo API for NYC with icons",
14"title": "Weather App",
15"code": "<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n <meta charset=\"UTF-8\">\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>NYC Weather</title>\n <link href=\"https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css\" rel=\"stylesheet\">\n <style>\n .weather-icon {\n font-size: 48px;\n margin-bottom: 16px;\n }\n </style>\n</head>\n<body class=\"h-screen bg-blue-100 flex justify-center items-center p-4\">\n <div class=\"bg-white p-8 rounded-md shadow-md w-full max-w-sm md:p-12 lg:p-16 xl:p-20\">\n <h1 class=\"text-2xl font-bold mb-4 text-center text-blue-500\">NYC Weather</h1>\n <div id=\"weather\" class=\"mb-4 p-4 text-center\">\n <div id=\"temperature\" class=\"text-4xl font-bold mb-4\"></div>\n <div id=\"condition\" class=\"text-xl font-medium mb-4\"></div>\n <div id=\"humidity\" class=\"text-lg font-light mb-2\">Humidity: <span id=\"humidity-value\"></span>%</div>\n <div id=\"wind\" class=\"text-lg font-light mb-2\">Wind: <span id=\"wind-value\"></span> mph</div>\n <i id=\"weather-icon\" class=\"weather-icon text-blue-500\"></i>\n </div>\n </div>\n <p class=\"fixed bottom-0 left-0 right-0 text-center p-4 text-gray-600 md:p-6 lg:p-8 xl:p-10\">\n Built on <a class=\"text-blue-600\" href=\"https://cerebrascoder.com\">Cerebras Coder</a>\n </p>\n\n <script>\n // Sample weather data\n const weatherData = {\n temperature: 75,\n condition: 'Sunny',\n humidity: 60,\n wind: 10,\n icon: 'sun'\n };\n\n document.getElementById('temperature').innerText = `${weatherData.temperature}°F`;\n document.getElementById('condition').innerText = weatherData.condition;\n document.getElementById('humidity-value').innerText = weatherData.humidity;\n document.getElementById('wind-value').innerText = weatherData.wind;\n\n // Map weather icon\n const weatherIcons = {\n 'sun': '☀',\n 'cloud': '☀',\n 'rain': '☃',\n 'snow': '☄'\n };\n\n document.getElementById('weather-icon').innerHTML = weatherIcons[weatherData.icon] || '';\n </script>\n</body>\n</html>",
cerebras_coderREADME.md2 matches
891. Sign up for [Cerebras](https://cloud.cerebras.ai/)
102. Get a Cerebras API Key
113. Save it in your project env variable called `CEREBRAS_API_KEY`
cerebras_coderindex.html3 matches
5<meta name="viewport" content="width=device-width, initial-scale=1.0">
6<title>CerebrasCoder</title>
7<link rel="preconnect" href="https://fonts.googleapis.com" />
8<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
9<link
10href="https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400;1,500&family=DM+Sans:ital,opsz,wght@0,9..40,100..1000;1,9..40,100..1000&display=swap"
11rel="stylesheet"
12/>
21<meta property="og:description" content="Turn your ideas into fully functional apps in less than a second – powered by Llama3.3-70b on Cerebras's super-fast wafer chips. Code is 100% open-source, hosted on Val Town."">
22<meta property="og:type" content="website">
23<meta property="og:image" content="https://stevekrouse-blob_admin.web.val.run/api/public/CerebrasCoderOG.jpg">
24
25
cerebras_coderindex1 match
211} catch (error) {
212Toastify({
213text: "We may have hit our Cerebras Usage limits. Try again later or fork this and use your own API key.",
214position: "center",
215duration: 3000,
cerebras_codergenerate-code1 match
16};
17} else {
18const client = new Cerebras({ apiKey: Deno.env.get("CEREBRAS_API_KEY") });
19const completion = await client.chat.completions.create({
20messages: [