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/image-url.jpg%20%22Optional%20title%22?q=openai&page=49&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 1670 results for "openai"(971ms)

pythonToPPTAppmain.tsx4 matches

@hadlcandl•Updated 1 month ago
237export default async function server(request: Request): Promise<Response> {
238 if (request.method === "POST" && new URL(request.url).pathname === "/generate-ppt") {
239 const { OpenAI } = await import("https://esm.town/v/std/openai");
240 const { blob } = await import("https://esm.town/v/std/blob");
241 const openai = new OpenAI();
242
243 try {
257 }
258
259 // Use OpenAI to analyze the code and generate slide structure
260 let slidesData;
261 try {
262 const analysis = await openai.chat.completions.create({
263 model: "gpt-4o-mini",
264 messages: [

gregariousAmberWildfowlmain.tsx4 matches

@hadlcandl•Updated 1 month ago
219export default async function server(request: Request): Promise<Response> {
220 if (request.method === 'POST' && new URL(request.url).pathname === '/generate-ppt') {
221 const { OpenAI } = await import("https://esm.town/v/std/openai");
222 const { blob } = await import("https://esm.town/v/std/blob");
223 const openai = new OpenAI();
224
225 try {
236 }
237
238 // Use OpenAI to analyze the code and generate slide structure
239 const analysis = await openai.chat.completions.create({
240 model: "gpt-4o-mini",
241 messages: [

stevensDemo.cursorrules4 matches

@e69a756•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" },

productSummaryApimain.tsx3 matches

@nulo•Updated 1 month ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
3
4const openai = new OpenAI();
5const KEY = "productSummaryApi";
6const TABLE_NAME = `${KEY}_summaries_v4`;
38 const maxTokens = isLong ? 300 : 10;
39
40 const completion = await openai.chat.completions.create({
41 messages: [
42 {

stevensDemo.cursorrules4 matches

@geoffreylitt•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" },

cronmain.tsx1 match

@stevekrouse•Updated 1 month ago
1/** @jsxImportSource npm:hono@3/jsx */
2import { chat } from "https://esm.town/v/stevekrouse/openai";
3import cronstrue from "npm:cronstrue";
4import { Hono } from "npm:hono@3";

cronREADME.md1 match

@stevekrouse•Updated 1 month ago
8* Hono JSX
9* HTMX (probably overcomplicates things; should remove)
10* @stevekrouse/openai, which is a light wrapper around @std/openai
11
12I'm finding HTMX a bit overpowered for this, so I have two experimental forks without it:

emailSummaryHandlermain.tsx3 matches

@twseoking•Updated 1 month ago
2import { email } from "https://esm.town/v/std/email";
3import { extractValInfo } from "https://esm.town/v/stevekrouse/extractValInfo";
4import { OpenAI } from "npm:openai";
5
6function stripHtmlBackticks(html: string): string {
9
10export default async function(e: Email) {
11 const openai = new OpenAI();
12 console.log(`from: ${e.from} to: ${e.to} subject: ${e.subject}, cc: ${e.cc}, bcc: ${e.bcc}`);
13
25 }
26
27 const summary = await openai.chat.completions.create({
28 messages: [
29 {

researchAgentemailHandler2 matches

@twseoking•Updated 1 month ago
2import process from "node:process";
3import { marked } from "npm:marked";
4import { OpenAI } from "npm:openai";
5
6function pm(...lines: string[]): string {
16 );
17
18 const client = new OpenAI({ apiKey: process.env.PERPLEXITY_API_KEY, baseURL: "https://api.perplexity.ai" });
19 const response = await client.chat.completions.create({
20 model: "sonar",

vtProjectSearch2components.tsx2 matches

@charmaine•Updated 1 month ago
1215 <a href="?q=function" className="example-link">function</a>
1216 <a href="?q=discord" className="example-link">discord</a>
1217 <a href="?q=openai" className="example-link">openai</a>
1218 <a href="?q=react" className="example-link">react</a>
1219 </div>
1360 <a href="?q=function" className="example-link">function</a>
1361 <a href="?q=discord" className="example-link">discord</a>
1362 <a href="?q=openai" className="example-link">openai</a>
1363 <a href="?q=react" className="example-link">react</a>
1364 </div>

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 1 week ago

testOpenAI1 file match

@stevekrouse•Updated 1 week ago
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",