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=46&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 2155 results for "openai"(2029ms)

reactHonoStarterREADME.md2 matches

@Arthur88•Updated 3 weeks ago
40
41- **Backend**: `/backend/index.ts` - Handles API requests and serves frontend assets
42 - OpenAI integration for chat completions
43 - API endpoints for authentication, chat, and user data
44 - Supabase integration for database and authentication
68- **Database**: Supabase
69- **Authentication**: Supabase Auth
70- **AI**: OpenAI API
71- **Styling**: Custom CSS with Tailwind utility classes
72

reactHonoStarterindex.ts4 matches

@Arthur88•Updated 3 weeks ago
1import { serveFile, readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
2import { Hono } from "npm:hono";
3import { OpenAI } from "https://esm.town/v/std/openai";
4import { supabase, getSession } from "../shared/supabase.ts";
5import { AIAgent, Message, Conversation, UserSettings } from "../shared/types.ts";
7
8const app = new Hono();
9const openai = new OpenAI();
10
11// Default AI agents if database is not set up
232 };
233
234 // Prepare context for OpenAI
235 // Only use the last 10 messages for context to stay within token limits
236 const recentMessages = messageHistory.slice(-10).map((msg: Message) => ({
251 });
252
253 const completion = await openai.chat.completions.create({
254 messages: recentMessages,
255 model: agent.model,

Towniesystem_prompt.txt4 matches

@TheyClonedMe•Updated 3 weeks 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

@TheyClonedMe•Updated 3 weeks 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" },

vtProjectSearch.cursorrules4 matches

@w3b•Updated 3 weeks 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 3 weeks 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 3 weeks 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 3 weeks 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 3 weeks 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 3 weeks 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: [

openai-client1 file match

@cricks_unmixed4u•Updated 3 days ago

openai_enrichment6 file matches

@stevekrouse•Updated 5 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