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?q=openai&page=113&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 1610 results for "openai"(513ms)

movieMashupREADME.md1 match

@dthyressonUpdated 9 months ago
3It's Blader Runner meets Pretty in Pink.
4
5OpenAI generated movie maship title, tagline and treatments.
6
7Fal generated movie posters.

VALLEREADME.md1 match

@oijoijcoiejoijceUpdated 9 months ago
6* Fork this val to your own profile.
7* Make a folder for the temporary vals that get generated, take the ID from the URL, and put it in `tempValsParentFolderId`.
8* If you want to use OpenAI models you need to set the `OPENAI_API_KEY` [env var](https://www.val.town/settings/environment-variables).
9* If you want to use Anthropic models you need to set the `ANTHROPIC_API_KEY` [env var](https://www.val.town/settings/environment-variables).
10* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API token as the password to log in.

VALLErunmain.tsx2 matches

@roadlabsUpdated 9 months ago
8import { sleep } from "https://esm.town/v/stevekrouse/sleep?v=1";
9import { anthropic } from "npm:@ai-sdk/anthropic";
10import { openai } from "npm:@ai-sdk/openai";
11import ValTown from "npm:@valtown/sdk";
12import { StreamingTextResponse, streamText } from "npm:ai";
359 let vercelModel;
360 if (model.includes("gpt")) {
361 vercelModel = openai(model);
362 } else {
363 vercelModel = anthropic(model);

azureCheetahmain.tsx2 matches

@tmcwUpdated 9 months ago
9import { sleep } from "https://esm.town/v/stevekrouse/sleep?v=1";
10import { anthropic } from "npm:@ai-sdk/anthropic";
11import { openai } from "npm:@ai-sdk/openai";
12import ValTown from "npm:@valtown/sdk";
13import { StreamingTextResponse, streamText } from "npm:ai";
354 let vercelModel;
355 if (model.startsWith("gpt")) {
356 vercelModel = openai(model);
357 } else {
358 vercelModel = anthropic(model);

VALLErunmain.tsx2 matches

@tmcwUpdated 9 months ago
9import { sleep } from "https://esm.town/v/stevekrouse/sleep?v=1";
10import { anthropic } from "npm:@ai-sdk/anthropic";
11import { openai } from "npm:@ai-sdk/openai";
12import ValTown from "npm:@valtown/sdk";
13import { StreamingTextResponse, streamText } from "npm:ai";
354 let vercelModel;
355 if (model.startsWith("gpt")) {
356 vercelModel = openai(model);
357 } else {
358 vercelModel = anthropic(model);

VALLEREADME.md1 match

@tmcwUpdated 9 months ago
6* Fork this val to your own profile.
7* Make a folder for the temporary vals that get generated, take the ID from the URL, and put it in `tempValsParentFolderId`.
8* If you want to use OpenAI models you need to set the `OPENAI_API_KEY` [env var](https://www.val.town/settings/environment-variables).
9* If you want to use Anthropic models you need to set the `ANTHROPIC_API_KEY` [env var](https://www.val.town/settings/environment-variables).
10* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API token as the password to log in.

aimain.tsx3 matches

@kakiagpUpdated 9 months ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3export default async function(req: Request): Promise<Response> {
11 });
12 }
13 const openai = new OpenAI();
14
15 try {
28 }
29
30 const stream = await openai.chat.completions.create(body);
31
32 if (!body.stream) {

browserbase_google_concertsmain.tsx3 matches

@koraUpdated 9 months ago
1import puppeteer from "https://deno.land/x/puppeteer@16.2.0/mod.ts";
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3import { Browserbase } from "npm:@browserbasehq/sdk";
4
31
32// ask chat gpt for list of concert dates
33const openai = new OpenAI();
34
35const completion = await openai.chat.completions.create({
36 messages: [
37 { role: "system", content: "Return concert dates as JSON array. No code fences." },

ownOpenAImain.tsx4 matches

@koraUpdated 9 months ago
1import { OpenAI } from "npm:openai";
2
3const openai = new OpenAI();
4const completion = await openai.chat.completions.create({
5 "messages": [
6 { "role": "user", "content": "คุณรู้จัก Gemini ไหม" },
7 ],
8 model: "gpt-4o", // ถ้าใช้ของ std/openai จะได้แค่ gpt-4o-mini
9 max_tokens: 30,
10});

ownOpenAIREADME.md1 match

@koraUpdated 9 months ago
1Use my own OpenAI API key to avoid limit

translateToEnglishWithOpenAI1 file match

@shlmtUpdated 2 days ago

testOpenAI1 file match

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