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=77&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 1718 results for "openai"(749ms)

Resume_matchermain.tsx4 matches

@Chandrakanth95•Updated 2 months ago
303 if (request.method === 'POST') {
304 try {
305 const { OpenAI } = await import("https://esm.town/v/std/openai");
306 const openai = new OpenAI();
307
308 // New PDF extraction endpoint
328
329 if (request.url.includes('/api/extract-skills')) {
330 const response = await openai.chat.completions.create({
331 model: "gpt-4o-mini",
332 messages: [
356
357 if (request.url.includes('/api/compare-skills')) {
358 const jobSkillsResponse = await openai.chat.completions.create({
359 model: "gpt-4o-mini",
360 messages: [

aiPoweredHealthRecordSystemmain.tsx4 matches

@a_kS•Updated 2 months ago
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import OpenAI from "https://esm.sh/openai@4.28.4";
5
6// Patient record type
126export default async function server(request: Request): Promise<Response> {
127 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
128 const { OpenAI } = await import("https://esm.town/v/std/openai");
129 const KEY = "aiPoweredHealthRecordSystem";
130 const openai = new OpenAI();
131
132 // Create patient records table
170 if (request.method === 'POST' && new URL(request.url).pathname === '/ai-insight') {
171 const record = await request.json();
172 const completion = await openai.chat.completions.create({
173 messages: [
174 {

test_projectmain.js3 matches

@charmaine•Updated 2 months ago
1import { blob } from "https://esm.town/v/std/blob";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { readFile, servePublicFile } from "https://esm.town/v/stevekrouse/utils@187-main/serve-public/index.ts";
4import Algebrite from "npm:algebrite";
138 */
139async function handleProblemGeneration() {
140 const openai = new OpenAI();
141 const completion = await openai.chat.completions.create({
142 model: "gpt-4",
143 messages: [

chatgptmain.tsx4 matches

@mtz•Updated 2 months ago
138 }
139
140 // Import OpenAI dynamically
141 const { OpenAI } = await import("https://esm.town/v/std/openai");
142 const openai = new OpenAI();
143
144 // Generate chat completion
145 const completion = await openai.chat.completions.create({
146 messages: [{ role: "user", content: chat }],
147 model: model,

actuallyGoodEmojiSearchmain.tsx1 match

@maxm•Updated 2 months ago
128 Use plain language to search for emojis. Get great results.
129 <br />
130 Built on Val Town with sqlite vector search and openai embeddings.
131 <br />
132 Fork the <a href="${htmlUrl}" target="_blank">source</a> and build your own!

actuallyGoodEmojiSearchmain.tsx1 match

@stevekrouse•Updated 2 months ago
128 Use plain language to search for emojis. Get great results.
129 <br />
130 Built on Val Town with sqlite vector search and openai embeddings.
131 <br />
132 Fork the <a href="${htmlUrl}" target="_blank">source</a> and build your own!

Prompt_Improverorchestrator3 matches

@toowired•Updated 2 months ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3const openai = new OpenAI();
4const TIMEOUT_MS = 30000; // 30 second timeout
5
33 // Create API call promises with timeouts
34 const workerPromises = workerConfigs.map(config => {
35 const apiPromise = openai.chat.completions.create({
36 model: "gpt-4o-mini",
37 max_tokens: 500,

Prompt_ImproverPrompt_Improver3 matches

@toowired•Updated 2 months ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { ValTown } from "https://esm.town/v/stevekrouse/valtown";
3
4const openai = new OpenAI();
5const vt = new ValTown();
6const MAX_STEPS = 10;
34 }
35
36 const final = await openai.chat.completions.create({
37 model: "gpt-4o-mini",
38 max_tokens: 1000,

Chatterymain.tsx3 matches

@srijanb69•Updated 2 months ago
98export default async function server(request: Request): Promise<Response> {
99 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
100 const { OpenAI } = await import("https://esm.town/v/std/openai");
101 const openai = new OpenAI();
102
103 const { messages } = await request.json();
104
105 const stream = await openai.chat.completions.create({
106 model: "gpt-o1",
107 messages: messages,

videoVisionAnalysismain.tsx4 matches

@RuthvikBandari•Updated 2 months ago
144 if (request.method === 'POST') {
145 try {
146 const { OpenAI } = await import("https://esm.town/v/std/openai");
147 const openai = new OpenAI();
148
149 // Parse the JSON payload
158 const base64Image = frameDataUrl.split(',')[1];
159
160 // Use OpenAI Vision to analyze the image frame
161 const completion = await openai.chat.completions.create({
162 model: "gpt-4o",
163 messages: [

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": "*",