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/?q=openai&page=34&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 345 results for "openai"(211ms)

OpenTowniesystem_prompt.txt7 matches

@pomdtr•Updated 2 months ago
83
84 <library>
85 ## OpenAI
86
87 Val Town includes a free, proxied OpenAI:
88
89 ```ts
90 import { OpenAI } from "https://esm.town/v/std/openai";
91 const openai = new OpenAI();
92 const completion = await openai.chat.completions.create({
93 messages: [
94 { role: "user", content: "Say hello in a creative way" },
99 ```
100
101 OpenAI only works on the server. If the val includes client-side code, use dynamic imports to import this module in the server function, e.g.:
102 `const { OpenAI } = await import "https://esm.town/v/std/openai");`
103 </library>
104

OpenTowniegenerateCode3 matches

@shouser•Updated 3 months ago
1import OpenAI from "https://esm.sh/openai";
2
3function parseValResponse(response: string) {
28 const system = await (await fetch(`${import.meta.url.split("/").slice(0, -1).join("/")}/system_prompt.txt`)).text();
29
30 const openai = new OpenAI({
31 baseURL: "https://openrouter.ai/api/v1",
32 apiKey: Deno.env.get("OPEN_ROUTER_KEY"),
33 });
34 console.log(messages);
35 const completion = await openai.chat.completions.create({
36 model: "deepseek/deepseek-r1",
37 messages: [

OpenTowniesystem_prompt.txt7 matches

@shouser•Updated 3 months ago
83
84 <library>
85 ## OpenAI
86
87 Val Town includes a free, proxied OpenAI:
88
89 ```ts
90 import { OpenAI } from "https://esm.town/v/std/openai";
91 const openai = new OpenAI();
92 const completion = await openai.chat.completions.create({
93 messages: [
94 { role: "user", content: "Say hello in a creative way" },
99 ```
100
101 OpenAI only works on the server. If the val includes client-side code, use dynamic imports to import this module in the server function, e.g.:
102 `const { OpenAI } = await import "https://esm.town/v/std/openai");`
103 </library>
104

valreadmegeneratormain.tsx3 matches

@prashamtrivedi•Updated 4 months ago
177 }
178
179 const { OpenAI } = await import("https://esm.town/v/std/openai");
180 const openai = new OpenAI();
181
182 const valTownClient = new ValTown({
197
198 try {
199 const completion = await openai.chat.completions.create({
200 model: "gpt-4o",
201 messages: [

valreadmegeneratorREADME.md1 match

@prashamtrivedi•Updated 4 months ago
43- **Deno:** The server-side environment.
44- **ValTown SDK:** Integrated to fetch Val details.
45- **OpenAI GPT-4:** To generate natural language README content.
46- **JavaScript Modules (ESM):** For seamless module imports.
47

yc_findermain.tsx1 match

@stevekrouse•Updated 5 months ago
18brian@airbnb.com,Brian Chesky
19drew@dropbox.com,Drew Houston
20sam@openai.com,Sam Altman
21tim@apple.com,Tim Cook
22jeff@amazon.com,Jeff Bezos

stevens-openai5 file matches

@yash_ing•Updated 1 day ago

openaiPricing9 file matches

@nbbaier•Updated 1 week ago
Project created from val URLs