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/%22mailto:kurt@sachersolutions.ca//%22https:/fonts.gstatic.com/%22?q=openai&page=1&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 3237 results for "openai"(1158ms)

tasca_chatmain.ts3 matches

@bluemax•Updated 1 hour ago
1import { PresidentDocs } from "./nonprofitDocs";
2import { OpenAI } from "https://esm.town/v/std/openai";
3
4const openai = new OpenAI();
5
6export default async function (req: Request): Promise<Response> {
19 // { role: "user", content: "Say hello in a creative way" },
20
21 const completion = await openai.chat.completions.create({
22 messages: [
23 { role: "system", content: systemPrompt },

gatemain.ts3 matches

@know•Updated 3 hours ago
1import { nanoid } from "https://deno.land/x/nanoid@v3.0.0/mod.ts";
2import { blob } from "https://esm.town/v/std/blob?v=11";
3import { OpenAI } from "https://esm.town/v/std/openai?v=4";
4
5const AUDIT_DEPTH_INTERVAL = 2;
40
41// --- BACKEND LOGIC ---
42const openai = new OpenAI();
43
44async function callAI(
47): Promise<Prerequisite[]> {
48 try {
49 const completion = await openai.chat.completions.create({
50 model: "gpt-4o",
51 messages: [

h6-system_prompt.txt4 matches

@werewolf006•Updated 3 hours 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" },

h6-.cursorrules4 matches

@werewolf006•Updated 3 hours 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

@werewolf006•Updated 3 hours 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

@werewolf006•Updated 3 hours 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" },

untitled-8620main.ts3 matches

@know•Updated 3 hours ago
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3// @ts-ignore
4import { blob } from "https://esm.town/v/std/blob?v=11";
109const MAX_DEPTH = 4;
110const AUDIT_DEPTH_INTERVAL = 2; // Trigger auditor every 2 levels.
111const openai = new OpenAI();
112
113/**
116async function callAI(fact: string, prompt: string): Promise<Prerequisite[]> {
117 try {
118 const completion = await openai.chat.completions.create({
119 model: "gpt-4o",
120 messages: [

untitled-8620main.ts3 matches

@realtime•Updated 4 hours ago
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3// @ts-ignore
4import { blob } from "https://esm.town/v/std/blob?v=11";
57// --- CORE AI & TREE LOGIC ---
58const MAX_DEPTH = 4;
59const openai = new OpenAI();
60
61async function callAI(fact: string, prompt: string): Promise<Prerequisite[]> {
62 try {
63 const completion = await openai.chat.completions.create({
64 model: "gpt-4o",
65 messages: [

Towniesystem_prompt.txt4 matches

@Skywalker•Updated 6 hours 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

@Skywalker•Updated 6 hours 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-usage1 file match

@nbbaier•Updated 1 day ago

hello-realtime5 file matches

@jubertioai•Updated 4 days ago
Sample app for the OpenAI Realtime API
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