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=85&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 1837 results for "openai"(1093ms)

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(

healthChatbotmain.tsx3 matches

@sganta048•Updated 2 months ago
78export default async function server(request: Request): Promise<Response> {
79 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
80 const { OpenAI } = await import("https://esm.town/v/std/openai");
81 const openai = new OpenAI();
82
83 const body = await request.json();
98
99 try {
100 const completion = await openai.chat.completions.create({
101 messages: [
102 { role: "system", content: systemPrompt },

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 2 weeks ago

testOpenAI1 file match

@stevekrouse•Updated 2 weeks ago
reconsumeralization
import { OpenAI } from "https://esm.town/v/std/openai"; import { sqlite } from "https://esm.town/v/stevekrouse/sqlite"; /** * Practical Implementation of Collective Content Intelligence * Bridging advanced AI with collaborative content creation */ exp
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": "*",