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/$%7Burl%7D?q=openai&page=115&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 1604 results for "openai"(870ms)

OpenAIStreamingREADME.md1 match

@mjweaver01•Updated 9 months ago
1Migrated from folder: OpenAI/OpenAIStreaming

VALLEREADME.md1 match

@peterzakin•Updated 9 months ago
1Fork it and authenticate with your Val Town API token as the password. Needs an `OPENAI_API_KEY` env var to be set, and change the variables under "Set these to your own".
2
3https://x.com/JanPaul123/status/1812957150559211918

upgradeHTTPPreviewValsmain.tsx3 matches

@stevekrouse•Updated 9 months ago
1import { zip } from "https://esm.town/v/pomdtr/sql";
2import { db } from "https://esm.town/v/sqlite/db";
3import OpenAI from "npm:openai";
4
5async function getVals(username, type, limit) {
22
23async function checkHTTPPreviewUpgrade(code) {
24 const openai = new OpenAI();
25 const completion = await openai.chat.completions.create({
26 messages: [
27 {
8import { Hono } from "npm:hono@3";
9import _ from "npm:lodash@4";
10import OpenAI from "npm:openai";
11import { renderToString } from "npm:react-dom/server";
12
308
309 const contextWindow: any = await valleGetValsContextWindow(model);
310 const openai = new OpenAI();
311 const stream = await openai.chat.completions.create({
312 model,
313 stream: true,
8import { Hono } from "npm:hono@3";
9import _ from "npm:lodash@4";
10import OpenAI from "npm:openai";
11import { renderToString } from "npm:react-dom/server";
12
323
324 const contextWindow: any = await valleGetValsContextWindow(model);
325 const openai = new OpenAI();
326 const stream = await openai.chat.completions.create({
327 model,
328 stream: true,
8import { Hono } from "npm:hono@3";
9import _ from "npm:lodash@4";
10import OpenAI from "npm:openai";
11import { renderToString } from "npm:react-dom/server";
12
333
334 const contextWindow: any = await valleGetValsContextWindow(model);
335 const openai = new OpenAI();
336 const stream = await openai.chat.completions.create({
337 model,
338 stream: true,
8import { Hono } from "npm:hono@3";
9import _ from "npm:lodash@4";
10import OpenAI from "npm:openai";
11import { renderToString } from "npm:react-dom/server";
12
302
303 const contextWindow: any = await valleGetValsContextWindow(model);
304 const openai = new OpenAI();
305 const stream = await openai.chat.completions.create({
306 model,
307 stream: true,
8import { Hono } from "npm:hono@3";
9import _ from "npm:lodash@4";
10import OpenAI from "npm:openai";
11import { renderToString } from "npm:react-dom/server";
12
311
312 const contextWindow: any = await valleGetValsContextWindow(model);
313 const openai = new OpenAI();
314 const stream = await openai.chat.completions.create({
315 model,
316 stream: true,
8import { Hono } from "npm:hono@3";
9import _ from "npm:lodash@4";
10import OpenAI from "npm:openai";
11import { renderToString } from "npm:react-dom/server";
12
212
213 const contextWindow: any = await valleGetValsContextWindow(model);
214 const openai = new OpenAI();
215 const stream = await openai.chat.completions.create({
216 model,
217 stream: true,
8import { Hono } from "npm:hono@3";
9import _ from "npm:lodash@4";
10import OpenAI from "npm:openai";
11import { renderToString } from "npm:react-dom/server";
12
287
288 const contextWindow: any = await valleGetValsContextWindow(model);
289 const openai = new OpenAI();
290 const stream = await openai.chat.completions.create({
291 model,
292 stream: true,

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 1 day ago

testOpenAI1 file match

@stevekrouse•Updated 3 days ago
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",