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/$2?q=openai&page=19&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 2242 results for "openai"(3032ms)

Towniesystem_prompt.txt4 matches

@faithyz•Updated 1 week 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

@faithyz•Updated 1 week 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" },

Florencemain.tsx3 matches

@Get•Updated 1 week ago
489
490export default async function server(request: Request): Promise<Response> {
491 const { OpenAI } = await import("https://esm.town/v/std/openai");
492 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
493 const openai = new OpenAI(); // Ensure your OpenAI API key is set in environment variables
494 const KEY = "medtechtools_nurse_grad"; // Unique key for this app's tables
495
551 ];
552
553 const completion = await openai.chat.completions.create({
554 messages: messages,
555 model: "gpt-4o-mini", // or "gpt-3.5-turbo"

Towniesystem_prompt.txt4 matches

@nelo•Updated 1 week 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

@nelo•Updated 1 week 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_enrichmentindex.ts5 matches

@charmaine•Updated 1 week ago
1import OpenAI from "npm:openai";
2
3interface PersonEnrichmentRequest {
85Format your response as a structured report. If you cannot find information for any section, please indicate "No information found" for that section.`;
86
87 // Initialize OpenAI client
88 const client = new OpenAI({
89 apiKey: Deno.env.get("OPENAI_API_KEY"),
90 });
91
104
105 if (!content) {
106 throw new Error("No content returned from OpenAI");
107 }
108

stevensDemo.cursorrules4 matches

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

stevensDemo.cursorrules4 matches

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

stevensDemo.cursorrules4 matches

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

Amaravoicenotes.ts4 matches

@Victoria1234•Updated 1 week ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { blob } from "https://esm.town/v/std/blob";
3import { OpenAI } from "https://esm.town/v/std/openai";
4import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
5import {
15
16const app = new Hono();
17const openai = new OpenAI();
18
19// Get all voice notes (for admin/dashboard)
143async function transcribeAudio(voiceNoteId: string, audioBuffer: ArrayBuffer) {
144 try {
145 // Convert ArrayBuffer to File for OpenAI
146 const audioFile = new File([audioBuffer], "audio.webm", { type: "audio/webm" });
147
148 const transcription = await openai.audio.transcriptions.create({
149 file: audioFile,
150 model: "whisper-1",

openai-client1 file match

@cricks_unmixed4u•Updated 1 week ago

openai_enrichment6 file matches

@stevekrouse•Updated 1 week ago
kwhinnery_openai
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