Search
engraft_wikipedia
@joshuahhh
An interactive, runnable TypeScript val by joshuahhh
HTTP
import { EngraftPromise, RefuncMemory, runTool, ToolProgram } from "npm:@engraft/hostkit@0.0.7";
import { renderToString } from "npm:react-dom/server";
export default async function() {
const mem = new RefuncMemory();
const varBindings = {};
openAiFreeUsage
@patrickjm
// set at Sat Dec 09 2023 01:45:57 GMT+0000 (Coordinated Universal Time)
Script
// set at Sat Dec 09 2023 01:45:57 GMT+0000 (Coordinated Universal Time)
export let openAiFreeUsage = {"used_quota":12709400,"used_quota_usd":1.27094,"exceeded":false};
guest
@pomdtr
An interactive, runnable TypeScript val by pomdtr
HTTP
export default function() {
return fetch("file:///opt/render/project/src/guest/index.ts");
VALLE
@stevekrouse
Fork it and authenticate with your Val Town API token as the password. Needs an OPENAI_API_KEY env var to be set, and change the variables under "Set these to your own". https://x.com/JanPaul123/status/1812957150559211918
HTTP
Fork it and authenticate with your Val Town API token as the password. Needs an `OPENAI_API_KEY` env var to be set, and change the variables under "Set these to your own".
https://x.com/JanPaul123/status/1812957150559211918
myApi
@dabeeeenster
An interactive, runnable TypeScript val by dabeeeenster
Script
export function myApi(name) {
return "hi " + name;
val_Lp66OGSTA8
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_Lp66OGSTA8(req) {
try {
// Execute the code directly and capture its result
val_wsOEr1WRVH
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_wsOEr1WRVH(req) {
try {
// Execute the code directly and capture its result
quoteExtractor
@dh1011
📜 Quote Extractor Tool Quickly find all the quotes in any text! This tool is great for saving time when reading long articles that take forever to get to the important quotes. Just copy the whole article (Ctrl+A → Ctrl+C), paste it into the tool (Ctrl+V), and get all the quotes instantly. No more wasting time searching! 👍
HTTP
speaker: string;
function App() {
const [text, setText] = useState('');
</div>
function client() {
createRoot(document.getElementById("root")).render(<App />);
if (typeof document !== "undefined") { client(); }
export default async function server(request: Request): Promise<Response> {
if (request.method === 'POST' && request.url.endsWith('/extract')) {
const { OpenAI } = await import("https://esm.town/v/std/openai");
const openai = new OpenAI();
const { text } = await request.json();
const completion = await openai.chat.completions.create({
messages: [
weatherGPT
@jcoleman
Cron
import { email } from "https://esm.town/v/std/email?v=11";
import { OpenAI } from "npm:openai";
import { createHeaders, PORTKEY_GATEWAY_URL } from "npm:portkey-ai";
).then(r => r.json());
const openai = new OpenAI({
baseURL: PORTKEY_GATEWAY_URL,
apiKey: Deno.env.get("PORTKEY_API_KEY"),
virtualKey: Deno.env.get("PORTKEY_OPENAI_VIRTUAL_KEY"),
let chatCompletion = await openai.chat.completions.create({
messages: [{
console.log(text);
export async function weatherGPT() {
await email({ subject: "Weather Today", text });
pushover
@meatcar
// Send a pushover message.
Script
// Send a pushover message.
// token, user, and other opts are as specified at https://pushover.net/api
export async function pushover({ token, user, message, title, url, ...opts }) {
return await fetch("https://api.pushover.net/1/messages.json", {
method: "POST",
val_sUC1JuSSBu
@dhvanil
An interactive, runnable TypeScript val by dhvanil
HTTP
export async function val_sUC1JuSSBu(req) {
try {
// Execute the code directly and capture its result
pyodideMod
@iamseeley
An interactive, runnable TypeScript val by iamseeley
Script
import { initializePyodide } from "https://esm.town/v/iamseeley/pyodideSetup1";
import { executePython } from "https://esm.town/v/iamseeley/pyodideExecutor";
export async function runPythonCode(code: string) {
const pyodide = await initializePyodide();
return await executePython(pyodide, code);
export function runPythonCodeInWorker(code: string): Promise<string> {
return new Promise((resolve, reject) => {
const worker = new Worker(new URL("https://esm.town/v/iamseeley/pyodideWorker", import.meta.url), { type: "module" });
myApi
@byron
An interactive, runnable TypeScript val by byron
Script
export function myApi(name) {
return console.email("hello there", "email n shit");
pythonLearningApp
@mrshorts
@jsxImportSource https://esm.sh/react@18.2.0
HTTP
function PythonLearningApp() {
placeholder="Enter Python topic (e.g., lists, functions, classes)"
function client() {
export default async function server(request: Request): Promise<Response> {
// Dynamically import OpenAI with error handling
let OpenAI;
const module = await import("https://esm.town/v/std/openai");
OpenAI = module.OpenAI;
console.error('OpenAI import error:', importError);
error: `Failed to import OpenAI: ${importError.message}`