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/$1?q=openai&page=160&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 2133 results for "openai"(643ms)

inventorymain.tsx1 match

@ejfoxUpdated 9 months ago
26 { name: "Fly.io", icon: "🪰" },
27 { name: "Val.town", icon: "🏘️" },
28 { name: "OpenAI", icon: "🧠" },
29 { name: "SQLite", icon: "🗃️" },
30 { name: "Commander", icon: "🎖️" },

VALLEREADME.md1 match

@mrblanchardUpdated 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.

VALLEREADME.md1 match

@liviuUpdated 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.

valleGetValsContextWindowmain.tsx4 matches

@roadlabsUpdated 9 months ago
174 },
175 {
176 prompt: "Write a val that uses OpenAI",
177 code: `import { OpenAI } from "https://esm.town/v/std/openai";
178
179 const openai = new OpenAI();
180 const completion = await openai.chat.completions.create({
181 "messages": [
182 { "role": "user", "content": "Say hello in a creative way" },

valleBlogV0main.tsx3 matches

@wlxiaozhzhUpdated 9 months ago
3import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=84";
4import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken?v=1";
5import { openai } from "npm:@ai-sdk/openai";
6import ValTown from "npm:@valtown/sdk";
7import { streamText } from "npm:ai";
36
37 const stream = await streamText({
38 model: openai("gpt-4o", {
39 baseURL: "https://std-openaiproxy.web.val.run/v1",
40 apiKey: Deno.env.get("valtown"),
41 } as any),

VALLEREADME.md1 match

@wlxiaozhzhUpdated 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.

codeshowcasemain.tsx4 matches

@ejfoxUpdated 9 months ago
7 */
8
9import { OpenAI } from "https://esm.town/v/std/openai";
10
11export default async function server(request: Request): Promise<Response> {
14 const language = url.searchParams.get("language") || "javascript";
15
16 // Generate title using OpenAI
17 const openai = new OpenAI();
18 const completion = await openai.chat.completions.create({
19 messages: [
20 {

weeksummarymain.tsx4 matches

@ejfoxUpdated 9 months ago
147
148 if (url.pathname === "/api/summary") {
149 const { OpenAI } = await import("https://esm.town/v/std/openai");
150 const openai = new OpenAI();
151
152 const supabaseUrl = Deno.env.get("SUPABASE_PERSONAL_URL");
227 }));
228
229 // Generate summary using OpenAI
230 try {
231 const metadataString = `
246 ).join("\n");
247
248 const completion = await openai.chat.completions.create({
249 messages: [
250 {

VALLErunmain.tsx2 matches

@ejfoxUpdated 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";
1104 let vercelModel;
1105 if (model.includes("gpt")) {
1106 vercelModel = openai(model);
1107 } else {
1108 vercelModel = anthropic(model);

townGenREADME.md1 match

@cofsanaUpdated 9 months ago
3- [[https://www.val.town/v/stevekrouse/valwriter]]
4
5- _Note_: It looks like openai enhancement was dropped at some point when adding all the gizmos;
6

openai-client1 file match

@cricks_unmixed4uUpdated 2 days ago

openai_enrichment6 file matches

@stevekrouseUpdated 4 days 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
kwhinnery_openai