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/...?q=openai&page=29&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 2265 results for "openai"(1787ms)

TLDRApp.tsx1 match

@KymmsyUpdated 2 weeks ago
215 <div className="text-center mt-8 text-white/60 text-sm">
216 <p>
217 Powered by OpenAI • Built with ❤️ on Val Town
218 </p>
219 </div>

AlxprojectREADME.md2 matches

@Bioluwatife_elusakinUpdated 2 weeks ago
14```
15├── backend/
16│ └── index.ts # Main API server with OpenAI integration
17├── frontend/
18│ ├── index.html # Main application interface
33## Technology Stack
34
35- **Backend**: Hono + OpenAI API
36- **Frontend**: React + TailwindCSS
37- **AI**: GPT-4o-mini for concept explanations

Alxprojectindex.ts5 matches

@Bioluwatife_elusakinUpdated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
4import type { ConceptRequest, ConceptResponse, ErrorResponse } from "../shared/types.ts";
11});
12
13const openai = new OpenAI();
14
15// Serve static files
64Return only valid JSON without any markdown formatting.`;
65
66 const completion = await openai.chat.completions.create({
67 messages: [{ role: "user", content: prompt }],
68 model: "gpt-4o-mini",
73 const responseText = completion.choices[0]?.message?.content;
74 if (!responseText) {
75 throw new Error("No response from OpenAI");
76 }
77
81 conceptResponse = JSON.parse(responseText);
82 } catch (parseError) {
83 console.error("Failed to parse OpenAI response:", responseText);
84 throw new Error("Invalid response format from AI");
85 }

TLDRREADME.md3 matches

@KymmsyUpdated 2 weeks ago
6
7- **URL Content Extraction**: Fetches and parses HTML content from URLs
8- **Text Summarization**: Uses OpenAI API to generate concise summaries
9- **Error Handling**: Comprehensive error handling for various failure scenarios
10- **Static File Serving**: Serves frontend assets and shared utilities
56## Environment Variables
57
58- `OPENAI_API_KEY` - Required for AI summarization
59
60## Error Handling
62The API handles various error scenarios:
63- Invalid URLs or unreachable content
64- OpenAI API failures
65- Malformed requests
66- Content too short to summarize

Appindex.ts3 matches

@Yvnn24Updated 2 weeks ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { readFile, serveFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { OpenAI } from "https://esm.town/v/std/openai";
4import type { AITextRequest, AITextResponse, MemeTemplate } from "../shared/types.ts";
5
80 try {
81 const request: AITextRequest = await c.req.json();
82 const openai = new OpenAI();
83
84 const prompt = `Generate funny meme text for a "${request.templateName}" meme template.
96Return ONLY a JSON object with "topText" and "bottomText" fields. No other text.`;
97
98 const completion = await openai.chat.completions.create({
99 messages: [
100 { role: "system", content: "You are a hilarious meme generator that creates viral-worthy meme text. Always respond with valid JSON only." },

AppREADME.md1 match

@Yvnn24Updated 2 weeks ago
40- **Backend**: Hono (TypeScript API framework)
41- **Frontend**: React with TypeScript
42- **AI**: OpenAI GPT for funny text generation
43- **Styling**: TailwindCSS
44- **Canvas**: HTML5 Canvas for meme generation

Syphrose1990system_prompt.txt4 matches

@Syphrose1990Updated 2 weeks 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" },

Syphrose1990.cursorrules4 matches

@Syphrose1990Updated 2 weeks 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" },

Towniesystem_prompt.txt4 matches

@Syphrose1990Updated 2 weeks 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.cursorrules4 matches

@Syphrose1990Updated 2 weeks 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" },

openai-client4 file matches

@cricks_unmixed4uUpdated 13 hours ago

openai_enrichment6 file matches

@stevekrouseUpdated 1 week ago
kwhinnery_openai
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