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%22Image%20title%22?q=openai&page=65&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 1637 results for "openai"(815ms)

musicalPeachPerchmain.tsx2 matches

@ajax•Updated 2 months ago
1```typescript
2import { openai } from "npm:@ai-sdk/openai";
3import { generateText } from "npm:ai";
4
44
45 const { text: fortune } = await generateText({
46 model: openai("gpt-4o-mini"),
47 system: "You are a Star Trek themed fortune teller.",
48 prompt: `Create a fortune for someone with the traits: ${raceAssignment.traits}.`

HTTP101HTTPguide1 match

@willthereader•Updated 2 months ago
178 <h4>API</h4>
179 <p>An API (Application Programming Interface) is a set of rules and protocols designed to make it easy
180 to communicate. For example OpenAI has an API designed to make it easy for ChatGPT to communicate with
181 many different kinds of softwares. It's very common for front ends to call APIs. You don't literally
182 call an API, you call it's endpoints. There are disadvantages to calling an API like the fact you're

name_a_bad_personmain.tsx2 matches

@ajax•Updated 2 months ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
14
15 const { text } = await generateText({
16 model: openai("gpt-4o-mini"),
17 system: "You are a creative name generator that creates humorous or fitting names for people based on a given reason for why they are considered bad.",
18 prompt: `Generate a name for a person who is considered bad because: ${reason}. Make it creative and humorous.`,

name_a_car_inspired_by_colormain.tsx2 matches

@ajax•Updated 2 months ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
14
15 const { text } = await generateText({
16 model: openai("gpt-4o-mini"),
17 system: "You are a creative AI that generates unique car names based on a given color.",
18 prompt: `Create a unique and catchy car name for a car that is ${color}.`,

name_a_bird_after_carsmain.tsx1 match

@ajax•Updated 2 months ago
19
20 const { text } = await generateText({
21 model: openai("gpt-4o-mini"),
22 system: "You are a creative AI that generates bird names based on car models.",
23 prompt: `Generate a random bird name inspired by the following car models: ${carModels.join(", ")}.`

name_an_alligator_based_on_moviemain.tsx2 matches

@ajax•Updated 2 months ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
14
15 const { text } = await generateText({
16 model: openai("gpt-4o-mini"),
17 system: "You are a creative AI that names alligators based on movie descriptions.",
18 prompt: `Based on the following movie description, suggest a creative and fitting name for an alligator: ${movieDescription}`,

wholesomeJadeCardinalmain.tsx2 matches

@ajax•Updated 2 months ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
14
15 const { text } = await generateText({
16 model: openai("gpt-4o-mini"),
17 system: "You are a creative assistant that generates unique and catchy movie names based on a given movie description.",
18 prompt: `Generate a list of creative and catchy movie names based on the following description: ${movieDescription}`,

empatheticCrimsonAlligatormain.tsx2 matches

@ajax•Updated 2 months ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
20
21 const { text } = await generateText({
22 model: openai("gpt-4o-mini"),
23 system: "You are a creative assistant that generates unique names inspired by movie titles.",
24 prompt: `Create a unique name inspired by the movie title "${movieTitle}". Include a brief explanation of how the name relates to the movie's characters or themes.`,

generate_movie_inspired_namemain.tsx3 matches

@ajax•Updated 2 months ago
1import { openai } from "npm:@ai-sdk/openai";
2import { generateText } from "npm:ai";
3
46
47 const { text } = await generateText({
48 model: openai("gpt-4o-mini"),
49 system: "You are a creative assistant generating unique names inspired by movies.",
50 prompt,
57
58 const { text } = await generateText({
59 model: openai("gpt-4o-mini"),
60 system: "You are a creative assistant generating unique names inspired by movies.",
61 prompt,

movieButterflyNamermain.tsx1 match

@ajax•Updated 2 months ago
1import { generateText } from "npm:ai";
2import { openai } from "npm:@ai-sdk/openai";
3
4export default async function movieButterflyNamer(

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