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=61&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 2303 results for "openai"(7941ms)

vtProjectSearch.cursorrules4 matches

@w3b•Updated 1 month ago
94Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
95
96### OpenAI
97
98```ts
99import { OpenAI } from "https://esm.town/v/std/openai";
100const openai = new OpenAI();
101const completion = await openai.chat.completions.create({
102 messages: [
103 { role: "user", content: "Say hello in a creative way" },

vtProjectSearchcomponents.tsx2 matches

@w3b•Updated 1 month ago
1246 <a href="?q=function" className="example-link">function</a>
1247 <a href="?q=discord" className="example-link">discord</a>
1248 <a href="?q=openai" className="example-link">openai</a>
1249 <a href="?q=react" className="example-link">react</a>
1250 </div>
1401 <a href="?q=function" className="example-link">function</a>
1402 <a href="?q=discord" className="example-link">discord</a>
1403 <a href="?q=openai" className="example-link">openai</a>
1404 <a href="?q=react" className="example-link">react</a>
1405 </div>

ExperimentalMain.tsx7 matches

@salon•Updated 1 month ago
1import { fetch } from "https://esm.town/v/std/fetch";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { z } from "npm:zod";
4
263}
264
265// --- OpenAI Call Wrapper (Minor Abbreviation) ---
266async function callOpenAI(
267 sysP: string,
268 userP: string,
273 log("DB", "oai", `Call tid=${tid}`, { spL: sysP.length, upL: userP.length }, mid, tid);
274 try {
275 if (!process.env.OPENAI_API_KEY) {
276 log("ER", "oai", "Key missing.", {}, mid, tid);
277 throw new Error("OpenAI Key missing.");
278 }
279 const oai = new OpenAI();
280 const comp = await oai.chat.completions.create({
281 model: "gpt-4o-mini",
690 try {
691 const { sys, user } = cfg.p(p);
692 const rawC = await callOpenAI(sys, user, mid, tid, log);
693 if (!rawC) {
694 log("WN", cfg.n, `No LLM content tid=${tid}.`, {}, mid, tid);

vtProjectSearch.cursorrules4 matches

@tallesjp•Updated 1 month ago
94Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
95
96### OpenAI
97
98```ts
99import { OpenAI } from "https://esm.town/v/std/openai";
100const openai = new OpenAI();
101const completion = await openai.chat.completions.create({
102 messages: [
103 { role: "user", content: "Say hello in a creative way" },

vtProjectSearchcomponents.tsx2 matches

@tallesjp•Updated 1 month ago
1246 <a href="?q=function" className="example-link">function</a>
1247 <a href="?q=discord" className="example-link">discord</a>
1248 <a href="?q=openai" className="example-link">openai</a>
1249 <a href="?q=react" className="example-link">react</a>
1250 </div>
1401 <a href="?q=function" className="example-link">function</a>
1402 <a href="?q=discord" className="example-link">discord</a>
1403 <a href="?q=openai" className="example-link">openai</a>
1404 <a href="?q=react" className="example-link">react</a>
1405 </div>

IdkdeepResearchAgent.ts6 matches

@ibrinzila•Updated 1 month ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3// Initialize OpenAI client
4const openai = new OpenAI();
5
6// For debugging
204
205 try {
206 const response = await openai.chat.completions.create({
207 model: "gpt-4o",
208 messages: [
293
294 try {
295 const response = await openai.chat.completions.create({
296 model: "gpt-4o",
297 messages: [
334 ).join("\n\n");
335
336 const response = await openai.chat.completions.create({
337 model: "gpt-4o",
338 messages: [

IdkREADME.md2 matches

@ibrinzila•Updated 1 month ago
89If you encounter issues with the Deep Research Agent, try the following:
90
911. **Check OpenAI API Access**: Ensure your Val Town account has access to the OpenAI API.
92
932. **Verify Endpoints**: Make sure you're using the correct URLs for your Val Town username.
113## Requirements
114
115This agent uses the OpenAI API via Val Town's standard library. No additional setup is required.
116
117## Limitations

IdkresearchInterface.ts1 match

@ibrinzila•Updated 1 month ago
104
105 <footer class="mt-8 text-center text-gray-500 text-sm">
106 <p>Powered by Val Town and OpenAI</p>
107 <p class="mt-1">
108 <a href="${import.meta.url.replace("esm.sh", "val.town")}" target="_top" class="text-blue-500 hover:underline">View Source</a>

Towniesystem_prompt.txt4 matches

@jasonkneen•Updated 1 month ago
88Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
89
90### OpenAI
91
92```ts
93import { OpenAI } from "https://esm.town/v/std/openai";
94const openai = new OpenAI();
95const completion = await openai.chat.completions.create({
96 messages: [
97 { role: "user", content: "Say hello in a creative way" },

Townie.cursorrules4 matches

@jasonkneen•Updated 1 month ago
94Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
95
96### OpenAI
97
98```ts
99import { OpenAI } from "https://esm.town/v/std/openai";
100const openai = new OpenAI();
101const completion = await openai.chat.completions.create({
102 messages: [
103 { role: "user", content: "Say hello in a creative way" },

openai1 file match

@awei82•Updated 3 hours ago

openai-client4 file matches

@cricks_unmixed4u•Updated 15 hours 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