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/$%7Bart_info.art.src%7D?q=openai&page=59&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 1626 results for "openai"(562ms)

readyChocolatePikemain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
23
24 const { text: gameIdeas } = await generateText({
25 model: openai("gpt-4o-mini"),
26 system: "You are a creative game designer.",
27 prompt: prompt.trim(),

noteworthyAquamarineVipermain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
23
24 const { text: gameIdeas } = await generateText({
25 model: openai("gpt-4o-mini"),
26 system: "You are a creative game designer.",
27 prompt: prompt,

list_pokemon_game_ideasmain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
23
24 const { text: gameIdeas } = await generateText({
25 model: openai("gpt-4o-mini"),
26 system: "You are a creative game designer.",
27 prompt: prompt,

pokemon_game_ideas_listmain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
21
22 const { text: gameIdeas } = await generateText({
23 model: openai("gpt-4o-mini"),
24 system: "You are a creative game designer.",
25 prompt: prompt,

innovativeAzureHamstermain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
12 }
13 const { text: reflection } = await generateText({
14 model: openai("gpt-4o-mini"),
15 system: "You are a thoughtful and reflective assistant.",
16 prompt: "Reflect on the following user input and provide insights: " + body.user_input,

praiseworthyGreenJaymain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
12 }
13 const { text: reflection } = await generateText({
14 model: openai("gpt-4o-mini"),
15 system: "You are a thoughtful and insightful assistant.",
16 prompt: "Provide a detailed reflection on the following user input: " + body.user_input,

adventurousRoseGerbilmain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
12 }
13 const { text: insights } = await generateText({
14 model: openai("gpt-4o-mini"),
15 system: "You are a thoughtful assistant providing insights on user desires.",
16 prompt: "Reflect on the following user request and provide insights: " + body.user_input,

pontificate_on_user_wantsmain.tsx2 matches

@ajax•Updated 1 month ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
12 }
13 const { text: insights } = await generateText({
14 model: openai("gpt-4o-mini"),
15 system: "You are a thoughtful analyst providing insights into user desires and needs.",
16 prompt: "Reflect on the following user input and provide insights into the underlying desires or needs: " + body.user_input,

typeanythingmapmain.tsx3 matches

@danny•Updated 1 month ago
375 const { query } = await request.json();
376
377 const { OpenAI } = await import("https://esm.town/v/std/openai");
378 const openai = new OpenAI();
379
380 const response = await openai.chat.completions.create({
381 messages: [
382 {

OpenAIProxymain.tsx3 matches

@harveyfullstack•Updated 1 month ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3const openai = new OpenAI();
4const completion = await openai.chat.completions.create({
5 "messages": [
6 { "role": "user", "content": "Say hello in a creative way" },

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 4 days ago

testOpenAI1 file match

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