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=33&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 2138 results for "openai"(804ms)

OpenTownie.cursorrules4 matches

@h0a•Updated 2 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" },

ExperimentalMain.tsx5 matches

@Get•Updated 2 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
273}
274
275// --- OpenAI Call Wrapper ---
276async function callOpenAI(
277 sysP: string,
278 userP: string,
283 log("DB", "oai", `Call tid=${tid}`, { spL: sysP.length, upL: userP.length }, mid, tid);
284 try {
285 const oai = new OpenAI(); // Assumes OPENAI_API_KEY is set in environment
286 const comp = await oai.chat.completions.create({
287 model: "gpt-4o-mini",
819 try {
820 const { sys, user } = cfg.p(p);
821 const rawC = await callOpenAI(sys, user, mid, tid, log);
822 if (!rawC) {
823 log("WN", cfg.n, `No LLM content tid=${tid}.`, {}, mid, tid);

Towniesystem_prompt.txt4 matches

@japhethkingjackson•Updated 2 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

@japhethkingjackson•Updated 2 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" },

mahiindex.ts6 matches

@Mahi7•Updated 2 weeks ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { parseProject } from "https://esm.town/v/std/utils@85-main/index.ts";
4
5// Initialize OpenAI client
6const openai = new OpenAI();
7
8// Define response types
67 }
68
69 // Call OpenAI Vision API to analyze the image
70 const response = await openai.chat.completions.create({
71 model: "gpt-4o",
72 messages: [
93 console.error("Error analyzing image:", error);
94
95 // Determine if it's an OpenAI API error
96 const errorMessage = error instanceof Error
97 ? error.message

mahiREADME.md2 matches

@Mahi7•Updated 2 weeks ago
1# AI Image Recognition App
2
3This Val Town app uses OpenAI's Vision API to analyze images and provide descriptions of their content.
4
5## Features
23## Technologies Used
24
25- OpenAI Vision API
26- TailwindCSS for styling
27- Val Town's blob storage for caching (optional future enhancement)

Towniesystem_prompt.txt4 matches

@pachchigaryash•Updated 2 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

@pachchigaryash•Updated 2 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" },

Towniesystem_prompt.txt4 matches

@gueejla•Updated 2 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

@gueejla•Updated 2 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" },

openai-client1 file match

@cricks_unmixed4u•Updated 2 days ago

openai_enrichment6 file matches

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