Search

Results include substring matches and semantically similar vals. Learn more
janpaul123 avatar
valle_tmp_56208884983514818093201845315532
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import archiveVal from "https://esm.town/v/nbbaier/archiveVal?v=10";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
// Set these to your own
const username = "janpaul123";
heathergliffin avatar
DailyDaughterNotes
@heathergliffin
* This app generates cute daily notes for a daughter using OpenAI's GPT model. * It stores the generated notes in SQLite for persistence and displays them on a simple web interface. * The app uses React for the frontend and Deno's runtime environment in Val Town for the backend.
HTTP
* It stores the generated notes in SQLite for persistence and displays them on a simple web interface.
* The app uses React for the frontend and Deno's runtime environment in Val Town for the backend.
/** @jsxImportSource https://esm.sh/react */
import React, { useEffect, useState } from "https://esm.sh/react";
import { createRoot } from "https://esm.sh/react-dom/client";
function App() {
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
async function server(request: Request): Promise<Response> {
iamseeley avatar
multirouteHTML
@iamseeley
🌐 Personal Website with Server-Side Active Navigation
HTTP (deprecated)
🌐 Personal Website with Server-Side Active Navigation
* @title Personal Website with Server-Side Active Navigation
* @description Create a personal portfolio website with multiple pages and server-side active navigation using an HTTP Val.
import { websiteStyles } from "https://esm.town/v/iamseeley/websiteStyles";
<p>${personalData.summary}</p>
<p><strong>This website is rendered server-side with pure HTML.</strong></p>
<p>Check out the <a href='https://www.val.town/v/iamseeley/multirouteHTML'>source</a> and start building your own site!
triptych avatar
myspace
@triptych
Create your own Myspace profile, deployed to Val town. https://jdan-myspace.web.val.run Click "..." and select Fork to create your own. From there you can: Customize your own profile Or post on my wall by appending to messages and sending me a pull request
HTTP (deprecated)
"Middletown High School South",
"Middletown, NEW JERSEY",
"President: Computer Club",
start: "2006",
end: "2010",
janpaul123 avatar
valleCodemirror
@janpaul123
// const ret = await build({
Script
target: ts.ScriptTarget.ESNext,
module: ts.ModuleKind.ESNext,
jsx: ts.JsxEmit.React,
lib: ["esnext", "dom"],
moduleDetection: ModuleDetectionKind.Force,
jxnblk avatar
snake
@jxnblk
// WIP turn-based snake game built in Val Town
HTTP (deprecated)
// WIP turn-based snake game built in Val Town
/** @jsxImportSource npm:preact */
import { render } from "npm:preact-render-to-string";
import prng from "npm:pure-rand";
type V2 = [number, number];
jdan avatar
myspace
@jdan
Create your own Myspace profile, deployed to Val town. https://jdan-myspace.web.val.run Click "..." and select Fork to create your own. From there you can: Customize your own profile Or post on my wall by appending to messages and sending me a pull request
HTTP (deprecated)
"Middletown High School South",
"Middletown, NEW JERSEY",
"President: Computer Club",
start: "2006",
end: "2010",
janpaul123 avatar
valle_tmp_610457425865436710444833460520275
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/react */
import valleGetValsContextWindow from "https://esm.town/v/janpaul123/valleGetValsContextWindow";
import archiveVal from "https://esm.town/v/nbbaier/archiveVal?v=10";
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
// Set these to your own
const username = "janpaul123";
kousun12 avatar
shotclip
@kousun12
SHOTCLIP Demo of embedding images with substrate , and querying them for semantic relevance. Use the query parameter prompt to control the search.
HTTP (deprecated)
/** @jsxImportSource npm:react **/
import process from "node:process";
import { renderToString } from "npm:react-dom@18/server";
import { QueryVectorStore, sb, Substrate } from "npm:substrate";
type ShotResult = {
kirineko avatar
orangeHello
@kirineko
@jsxImportSource npm:react
HTTP (deprecated)
/** @jsxImportSource npm:react **/
import { renderToString } from "npm:react-dom@18/server";
export default (req: Request) => {
return new Response(
hfu avatar
react_maplibre
@hfu
React MapLibre GL JS example Thanks: @yuiseki
HTTP (deprecated)
# React MapLibre GL JS example
Thanks: @yuiseki
import React from "npm:react";
import { renderToString } from "npm:react-dom/server";
export default async function(req: Request) {
vawogbemi avatar
multirouteHono
@vawogbemi
🌐 Multi-Route Website with Hono
HTTP (deprecated)
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>${personalData.name} | Server-side Hono</title>
<style>
${websiteStyles}
<p>{personalData.summary}</p>
<p>
<strong>This website is rendered server-side with Hono.</strong>
</p>
<p>
stevekrouse avatar
valwriter
@stevekrouse
[ ] streaming [ ] send the code of the valwriter back to gpt (only if it's related, might need some threads, maybe a custom gpt would be a better fix, of course, could do it as a proxy...) [ ] make it easy to send errors back to gpt [ ] make it easy to get screenshots of the output back to gpt
HTTP (deprecated)
const examples = [
user: "website that shows the current time",
content: `/** @jsxImportSource npm:react */
export default function() {
return <h1>{new Date().toLocaleTimeString()}</h1>;
willthereader avatar
purpleKangaroo
@willthereader
ChatGPT Implemented in Val Town Demonstrated how to use assistants and threads with the OpenAI SDK and how to stream the response with Server-Sent Events.
HTTP (deprecated)
/** @jsxImportSource https://esm.sh/react */
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
// This uses by personal API key, you'll need to provide your own if
return new Response(renderToString(jsx), { headers: { "Content-Type": "text/html" } });
const clientCode = () => {
document.getElementById("input").addEventListener("submit", async function(event) {
</form>
<script dangerouslySetInnerHTML={{ __html: `(${clientCode.toString()})()` }}>
</script>
jxnblk avatar
valTownLogotypeReact
@jxnblk
@jsxImportSource npm:react
Script
/** @jsxImportSource npm:react */
import React from "npm:react";
export default function ValTownLogo(props: React.SVGProps<SVGSVGElement>) {
return (