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=67&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 1614 results for "openai"(691ms)

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: [

ecstaticSalmonOrangutanmain.tsx1 match

@keval•Updated 2 months ago
110 >
111 <option value="fallback">Fallback Model</option>
112 <option value="openai">OpenAI-like</option>
113 </select>
114 <button onClick={toggleTheme} className="theme-toggle">

resourcefulPurpleBobolinkmain.tsx3 matches

@harsha_5870•Updated 2 months ago
179export default async function server(request: Request): Promise<Response> {
180 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
181 const { OpenAI } = await import("https://esm.town/v/std/openai");
182
183 const KEY = "resourcefulPurpleBobolink";
205 if (request.method === "POST") {
206 const { query } = await request.json();
207 const openai = new OpenAI();
208
209 // Retrieve previous conversation context
220 ).join("\n");
221
222 const completion = await openai.chat.completions.create({
223 messages: [
224 {

incredibleBrownEarwigmain.tsx3 matches

@HTKhan7•Updated 2 months ago
277export default async function server(request: Request): Promise<Response> {
278 if (request.method === "POST") {
279 const { OpenAI } = await import("https://esm.town/v/std/openai");
280 const openai = new OpenAI();
281
282 const body = await request.json();
290 : "You are Thunder, an intelligent and helpful AI assistant created by Team HTKhan. You are skilled in conversing about various topics, answering questions, and providing assistance. and HTKhan refers to Huzaifa Taif Khan,Provide friendly, clear, and helpful responses.";
291
292 const completion = await openai.chat.completions.create({
293 messages: [
294 { role: "system", content: systemPrompt },

AkhilAimain.tsx3 matches

@Akhil_23•Updated 2 months ago
155export default async function server(request: Request): Promise<Response> {
156 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
157 const { OpenAI } = await import("https://esm.town/v/std/openai");
158 const openai = new OpenAI();
159
160 try {
205 ];
206
207 const completion = await openai.chat.completions.create({
208 messages: completionMessages,
209 model: "gpt-4o-mini",

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 3 days ago

testOpenAI1 file match

@stevekrouse•Updated 5 days 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": "*",