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/image-url.jpg?q=openai&page=85&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 1967 results for "openai"(1152ms)

AIAndAfricaProjectWebsitemain.tsx3 matches

@reawrytes•Updated 2 months ago
360 if (new URL(request.url).pathname === "/ai-insights") {
361 try {
362 const { OpenAI } = await import("https://esm.town/v/std/openai");
363 const openai = new OpenAI();
364 const completion = await openai.chat.completions.create({
365 messages: [{
366 role: "user",

supremeBlueDormousemain.tsx3 matches

@HTKhan31•Updated 2 months ago
215export default async function server(request: Request): Promise<Response> {
216 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
217 const { OpenAI } = await import("https://esm.town/v/std/openai");
218 const openai = new OpenAI();
219
220 const body = await request.json();
233 ];
234
235 const stream = await openai.chat.completions.create({
236 messages: messages,
237 model: "gpt-3.5-turbo",

OpenTowniesystem_prompt.txt4 matches

@loading•Updated 2 months ago
137Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
138
139### OpenAI
140```ts
141import { OpenAI } from "https://esm.town/v/std/openai";
142const openai = new OpenAI();
143const completion = await openai.chat.completions.create({
144 messages: [
145 { role: "user", content: "Say hello in a creative way" },

OpenTownie_1742929531340system_prompt.txt4 matches

@dcm31•Updated 2 months ago
137Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
138
139### OpenAI
140```ts
141import { OpenAI } from "https://esm.town/v/std/openai";
142const openai = new OpenAI();
143const completion = await openai.chat.completions.create({
144 messages: [
145 { role: "user", content: "Say hello in a creative way" },

OpenTownie_1742929529007system_prompt.txt4 matches

@dcm31•Updated 2 months ago
137Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
138
139### OpenAI
140```ts
141import { OpenAI } from "https://esm.town/v/std/openai";
142const openai = new OpenAI();
143const completion = await openai.chat.completions.create({
144 messages: [
145 { role: "user", content: "Say hello in a creative way" },

svgEditorsystem_prompt.txt4 matches

@dcm31•Updated 2 months ago
137Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
138
139### OpenAI
140```ts
141import { OpenAI } from "https://esm.town/v/std/openai";
142const openai = new OpenAI();
143const completion = await openai.chat.completions.create({
144 messages: [
145 { role: "user", content: "Say hello in a creative way" },

medicalChatBotWebsitemain.tsx3 matches

@saiprabhas•Updated 2 months ago
98export default async function server(request: Request): Promise<Response> {
99 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
100 const { OpenAI } = await import("https://esm.town/v/std/openai");
101 const openai = new OpenAI();
102
103 const { message } = await request.json();
104
105 const completion = await openai.chat.completions.create({
106 messages: [
107 {

OpenTownieNormalsystem_prompt.txt4 matches

@dcm31•Updated 2 months ago
137Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
138
139### OpenAI
140```ts
141import { OpenAI } from "https://esm.town/v/std/openai";
142const openai = new OpenAI();
143const completion = await openai.chat.completions.create({
144 messages: [
145 { role: "user", content: "Say hello in a creative way" },

todo_appmain.tsx3 matches

@ghofieee•Updated 2 months ago
165export default async function server(request: Request): Promise<Response> {
166 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
167 const { OpenAI } = await import("https://esm.town/v/std/openai");
168 const KEY = "todo_app";
169 const openai = new OpenAI();
170
171 // Ensure tables exist
221 const { examDate } = await request.json();
222
223 const completion = await openai.chat.completions.create({
224 messages: [
225 {

Women_In_STEMmain.tsx5 matches

@hadji_b•Updated 2 months ago
2import React, { useState, useEffect } from "https://esm.sh/react@18.2.0";
3import { createRoot } from "https://esm.sh/react-dom@18.2.0/client";
4import { OpenAI } from "https://esm.town/v/std/openai";
5
6function WomenInSTEMBlog() {
80export default async function server(request: Request): Promise<Response> {
81 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
82 const { OpenAI } = await import("https://esm.town/v/std/openai");
83 const openai = new OpenAI();
84 const KEY = "Women_In_STEM";
85 const SCHEMA_VERSION = 5;
147 for (const woman of womenAndInventions) {
148 // Generate concise, inspirational biography
149 const biographyCompletion = await openai.chat.completions.create({
150 messages: [{
151 role: "user",
157
158 // Generate detailed invention description
159 const inventionCompletion = await openai.chat.completions.create({
160 messages: [{
161 role: "user",

openaiproxy2 file matches

@skutaans•Updated 4 days ago

token-server1 file match

@kwhinnery_openai•Updated 5 days ago
Mint tokens to use with the OpenAI Realtime API for WebRTC
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