Val Town Code SearchReturn to Val Town

API Access

You can access search results via JSON API by adding format=json to your query:

https://codesearch.val.run/$%7Bsuccess?q=openai&page=56&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=openai

Returns an array of strings in format "username" or "username/projectName"

Found 3218 results for "openai"(2931ms)

guessmain.tsx4 matches

@join•Updated 1 month ago
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3
4// --- AI BEHAVIORAL GUIDELINES ---
420 const url = new URL(req.url);
421 const action = url.searchParams.get("action");
422 const openai = new OpenAI();
423
424 if (req.method === "POST") {
426 switch (action) {
427 case "newGame": {
428 const completion = await openai.chat.completions.create({
429 model: "gpt-4o",
430 messages: [{ role: "system", content: NEW_GAME_PROMPT }],
440 throw new Error("Guess and secretWord are required.");
441 }
442 const completion = await openai.chat.completions.create({
443 model: "gpt-4o",
444 messages: [

winnREADME.md3 matches

@spooky•Updated 1 month ago
24- **Backend:** Hono.js API framework
25- **Database:** SQLite for data persistence
26- **AI:** OpenAI GPT-4 for blend generation and sensory prediction
27- **Frontend:** React with TailwindCSS
28- **Storage:** Val Town Blob storage for file uploads
131## Technology Stack
132
133- **Backend:** Hono.js, SQLite, OpenAI GPT-4
134- **Frontend:** React, TailwindCSS
135- **Platform:** Val Town serverless environment
136- **Database:** SQLite with comprehensive wine data schema
137- **AI Integration:** OpenAI API for blend generation and sensory prediction

winnblends.ts3 matches

@spooky•Updated 1 month ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import type {
4 BlendGenerationRequest,
18
19const app = new Hono();
20const openai = new OpenAI();
21
22// Generate a new wine blend using AI
35 const prompt = createBlendGenerationPrompt(request, availableBlocks);
36
37 const completion = await openai.chat.completions.create({
38 model: "gpt-4o-mini",
39 messages: [

stevensDemo.cursorrules4 matches

@nef•Updated 1 month ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

regexToBrainrotmain.tsx4 matches

@wolf•Updated 1 month ago
300 { getRandomRegexExplanation, saveRegexExplanation, getRegexExplanationById },
301 ReactMarkdown,
302 { OpenAI },
303 { renderToString },
304 { jsx, jsxs, Fragment },
306 import("https://esm.town/v/stainless_em/brainrotdb"),
307 import("npm:react-markdown@7"),
308 import("https://esm.town/v/std/openai"),
309 import("npm:react-dom@19/server.browser"),
310 import("npm:react@19/jsx-runtime"),
336 }
337
338 const openai = new OpenAI();
339
340 const abortController = new AbortController();
341 const completion = await openai.chat.completions.create({
342 messages: [
343 {

stevensDemo.cursorrules4 matches

@raafaadal•Updated 1 month ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

PineconeIndexPineconeIndex1 match

@peterqliu•Updated 1 month ago
78 const {model, modelToken} = this.options;
79 const response = await axios.post(
80 "https://api.openai.com/v1/embeddings",
81 {model, input: text },
82 {

dotcomWordle.tsx1 match

@petermillspaugh•Updated 1 month ago
119 for $3.5m, and <code>aunty.com</code>{" "}
120 for $60k. These prices are, of course, negotiable. I can't imagine anyone paying more for{" "}
121 <code>craze.com</code> than OpenAI paid for <code>chat.com</code>{" "}
122 a couple years ago, for example. In the book I'll cover how these aftermarkets work and what shady behavior
123 goes on behind the scenes.

Townie-3system_prompt.txt4 matches

@dinavinter•Updated 1 month ago
88Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
89
90### OpenAI
91
92```ts
93import { OpenAI } from "https://esm.town/v/std/openai";
94const openai = new OpenAI();
95const completion = await openai.chat.completions.create({
96 messages: [
97 { role: "user", content: "Say hello in a creative way" },

Townie-3.cursorrules4 matches

@dinavinter•Updated 1 month ago
94Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
95
96### OpenAI
97
98```ts
99import { OpenAI } from "https://esm.town/v/std/openai";
100const openai = new OpenAI();
101const completion = await openai.chat.completions.create({
102 messages: [
103 { role: "user", content: "Say hello in a creative way" },

hello-realtime5 file matches

@jubertioai•Updated 3 days ago
Sample app for the OpenAI Realtime API

openai-gemini1 file match

@ledudu•Updated 1 week ago
reconsumeralization
import { OpenAI } from "https://esm.town/v/std/openai"; import { sqlite } from "https://esm.town/v/stevekrouse/sqlite"; /** * Practical Implementation of Collective Content Intelligence * Bridging advanced AI with collaborative content creation */ exp
kwhinnery_openai