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=55&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"(2968ms)

ai-shinemain.tsx14 matches

@real•Updated 1 month ago
2// It uses the Hono web framework to serve a Single-Page Application (SPA).
3
4import { OpenAI } from "https://esm.town/v/std/openai";
5import { Hono } from "npm:hono@4.4.12";
6import type { Context } from "npm:hono@4.4.12";
815 if (!industry) return c.json({ error: "Industry is a required field." }, 400);
816 try {
817 const openai = new OpenAI();
818 const completion = await openai.chat.completions.create({
819 model: "gpt-4o",
820 messages: [{ role: "system", content: DYNAMIC_LIST_GENERATOR_PROMPT }, {
836 if (!occupation) return c.json({ error: "Occupation is a required field." }, 400);
837 try {
838 const openai = new OpenAI();
839 const completion = await openai.chat.completions.create({
840 model: "gpt-4o",
841 messages: [{ role: "system", content: DYNAMIC_LIST_GENERATOR_PROMPT }, {
862
863 try {
864 const openai = new OpenAI();
865 const completion = await openai.chat.completions.create({
866 model: "gpt-4o",
867 messages: [{ role: "system", content: PROMPT_REFINER_SYSTEM_PROMPT }, { role: "user", content: userInput }],
880 if (!refined_prompt) return c.json({ error: "refined_prompt is required" }, 400);
881 try {
882 const openai = new OpenAI();
883 const completion = await openai.chat.completions.create({
884 model: "gpt-4o",
885 messages: [{ role: "system", content: INPUT_EXTRACTOR_SYSTEM_PROMPT }, {
901 if (!refined_prompt) return c.json({ error: "refined_prompt is required" }, 400);
902 try {
903 const openai = new OpenAI();
904 const completion = await openai.chat.completions.create({
905 model: "gpt-4o",
906 messages: [{ role: "system", content: CLARIFICATION_AGENT_SYSTEM_PROMPT }, {
956
957 try {
958 const openai = new OpenAI();
959 const agentCompletion = await openai.chat.completions.create({
960 model: "gpt-4o",
961 messages: [{ role: "system", content: systemPromptWithContext }, {
968 if (!agentOutput) throw new Error("The agent returned no content.");
969
970 const htmlCompletion = await openai.chat.completions.create({
971 model: "gpt-4o",
972 messages: [{ role: "system", content: HTML_FORMATTER_SYSTEM_PROMPT }, { role: "user", content: agentOutput }],

blogget-old-posts.ts5 matches

@Test_Org•Updated 1 month ago
198 },
199 {
200 "title": "An Introduction to OpenAI fine-tuning",
201 "slug": "an-introduction-to-openai-fine-tuning",
202 "link": "/blog/an-introduction-to-openai-fine-tuning",
203 "description": "How to customize OpenAI to your liking",
204 "pubDate": "Fri, 25 Aug 2023 00:00:00 GMT",
205 "author": "Steve Krouse",
417 "slug": "val-town-newsletter-16",
418 "link": "/blog/val-town-newsletter-16",
419 "description": "Our seed round, growing team, Codeium completions, @std/openai, and more",
420 "pubDate": "Mon, 22 Apr 2024 00:00:00 GMT",
421 "author": "Steve Krouse",

blog2025-06-03-newsletter-25.md1 match

@Test_Org•Updated 1 month ago
167- [**We at Val Town**](https://www.val.town/u/valdottown) made [door](https://www.val.town/x/valdottown/door) for Val Town office guests to open the door through their phone, like [this](https://www.val.town/x/valdottown/door/pull/ef854848-34b0-11f0-9887-9e149126039e)!
168- [**Joey Hiller**](https://www.val.town/u/jhiller) made [ValTown-Package-Tracker](https://www.val.town/x/jhiller/ValTown-Package-Tracker) to track a package of sensors he was sending from Oakland to us in Downtown Brooklyn!
169- [**dinavinter**](https://www.val.town/u/dinavinter) made [slack](https://www.val.town/x/dinavinter/slack), a Slack bot that uses OpenAI to generate responses.
170- [**prashamtrivedi**](https://www.val.town/u/prashamtrivedi) made [hn-remote-ts-genai-jobs](https://www.val.town/x/prashamtrivedi/hn-remote-ts-genai-jobs), to track Hacker News' Who's Hiring filter for remote TypeScript + GenAI-related jobs.
171- [**dcm31**](https://www.val.town/u/dcm31) made [rotrank](https://www.val.town/x/dcm31/rotrank), an ELO ranking system for popular Italian Brainrot characters.

fib-bonusindex-running.html2 matches

@kilocode•Updated 1 month ago
412 target="_blank"
413 rel="noopener noreferrer"
414 >OpenAI</a
415 >
416 both achieved
417 <a
418 href="https://www.axios.com/2025/07/21/openai-deepmind-math-olympiad-ai"
419 class="text-blue-600 underline hover:text-gray-500"
420 target="_blank"

fib-bonusindex.html1 match

@kilocode•Updated 1 month ago
225 <p class="text-gray-700 mb-4 text-lg leading-relaxed">
226 We hope you enjoyed celebrating the historic achievements in
227 mathematical AI with us. Both Google and OpenAI's gold medal
228 performances at the International Mathematical Olympiad marked a
229 significant milestone in artificial intelligence.

game2main.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 ---
529 const url = new URL(req.url);
530 const action = url.searchParams.get("action");
531 const openai = new OpenAI({ apiKey: process.env.openai });
532
533 if (req.method === "POST") {
538 if (!difficulty) throw new Error("Difficulty level is required.");
539 const dynamicNewGamePrompt = getNewGamePrompt(difficulty);
540 const completion = await openai.chat.completions.create({
541 model: "gpt-4o",
542 messages: [{ role: "system", content: dynamicNewGamePrompt }],
550 const { guess, secretWord } = await req.json();
551 if (!guess || !secretWord) throw new Error("Guess and secretWord are required.");
552 const completion = await openai.chat.completions.create({
553 model: "gpt-4o",
554 messages: [{ role: "system", content: CHECK_GUESS_PROMPT }, {

family-gpt-chatindex.ts6 matches

@tijs•Updated 1 month ago
1import { Hono } from "https://esm.sh/hono";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { serveFile } from "https://esm.town/v/std/utils/index.ts";
4import type { ChatRequest, ChatResponse } from "../shared/types.ts";
25 }
26
27 // Build conversation context for OpenAI
28 const messages = [
29 {
44 ];
45
46 // Call OpenAI API
47 const openai = new OpenAI();
48 const completion = await openai.chat.completions.create({
49 model: "gpt-3.5-turbo",
50 messages,
56
57 if (!assistantMessage) {
58 throw new Error("No response from OpenAI");
59 }
60

family-gpt-chatREADME.md4 matches

@tijs•Updated 1 month ago
2
3A ChatGPT-like chat application built for Val Town using React and Hono with
4OpenAI integration.
5
6## Features
7
8- 💬 Real-time chat interface with ChatGPT-like styling
9- 🤖 OpenAI GPT-3.5-turbo integration via Val Town's standard library
10- 📱 Responsive design with Tailwind CSS
11- âš¡ Fast TypeScript development with Deno
36
37- `GET /` - Serves the React frontend
38- `POST /api/chat` - Chat with OpenAI (requires message and optional
39 conversation history)
40- `GET /api/health` - Health check endpoint
79- **Frontend**: React with TypeScript
80- **Styling**: Tailwind CSS (via CDN)
81- **AI**: OpenAI GPT-3.5-turbo via Val Town's standard library
82- **Runtime**: Deno
83- **Platform**: Val Town

wordcloudmain.tsx3 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 ---
402 (async () => {
403 try {
404 const openai = new OpenAI();
405 const body = await req.json();
406 const text = body.text;
415 ];
416
417 const completion = await openai.chat.completions.create({
418 model: "gpt-4o",
419 messages: messages,

mealsmain.tsx4 matches

@join•Updated 1 month ago
4import { cors } from "npm:hono@4.4.12/cors";
5// @ts-ignore
6import { OpenAI } from "https://esm.town/v/std/openai?v=4";
7// @ts-ignore
8import { sqlite } from "https://esm.town/v/std/sqlite?v=4";
80 }
81
82 const openai = new OpenAI({
83 apiKey: Deno.env.get("OPENAI_API_KEY"),
84 });
85
89`;
90
91 const completion = await openai.chat.completions.create({
92 model: "gpt-4o",
93 messages: [

hello-realtime5 file matches

@jubertioai•Updated 2 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