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=150&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 2153 results for "openai"(3198ms)

bedtimeStoryMakermain.tsx1 match

@dependify•Updated 6 months ago
19import { generateOpenGraphTags, OpenGraphData } from "https://esm.town/v/dthyresson/generateOpenGraphTags";
20import { ValTownLink } from "https://esm.town/v/dthyresson/viewOnValTownComponent";
21import { chat } from "https://esm.town/v/stevekrouse/openai";
22import * as fal from "npm:@fal-ai/serverless-client";
23

Albertmain.tsx4 matches

@jidun•Updated 6 months ago
287
288 try {
289 const { OpenAI } = await import("https://esm.town/v/std/openai");
290 const openai = new OpenAI();
291
292 const completion = await openai.chat.completions.create({
293 messages: [
294 {
307 });
308 } catch (error) {
309 console.error("OpenAI error:", error);
310 return c.json({ response: "Neural networks malfunctioning. Try again, human." });
311 }

Ms_Spanglermain.tsx4 matches

@jidun•Updated 6 months ago
287
288 try {
289 const { OpenAI } = await import("https://esm.town/v/std/openai");
290 const openai = new OpenAI();
291
292 const completion = await openai.chat.completions.create({
293 messages: [
294 {
307 });
308 } catch (error) {
309 console.error("OpenAI error:", error);
310 return c.json({ response: "Neural networks malfunctioning. Try again, human." });
311 }

multilingualchatroommain.tsx3 matches

@lloydpearsoniv•Updated 6 months ago
498 const url = new URL(request.url);
499 const { blob } = await import("https://esm.town/v/std/blob");
500 const { OpenAI } = await import("https://esm.town/v/std/openai");
501
502 const openai = new OpenAI();
503
504 // Simple rate limiting
537
538 try {
539 const completion = await openai.chat.completions.create({
540 messages: [
541 {

HermesTresmegistusmain.tsx4 matches

@jidun•Updated 6 months ago
287
288 try {
289 const { OpenAI } = await import("https://esm.town/v/std/openai");
290 const openai = new OpenAI();
291
292 const completion = await openai.chat.completions.create({
293 messages: [
294 {
307 });
308 } catch (error) {
309 console.error("OpenAI error:", error);
310 return c.json({ response: "Neural networks malfunctioning. Try again, human." });
311 }

VALLEmain.tsx3 matches

@ubixsnow•Updated 6 months ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2const openai = new OpenAI();
3const completion = await openai.chat.completions.create({
4 messages: [
5 { role: "user", content: "Say hello in a creative way" },

VALLEREADME.md1 match

@ubixsnow•Updated 6 months ago
6* Fork this val to your own profile.
7* Make a folder for the temporary vals that get generated, take the ID from the URL, and put it in `tempValsParentFolderId`.
8* If you want to use OpenAI models you need to set the `OPENAI_API_KEY` [env var](https://www.val.town/settings/environment-variables).
9* If you want to use Anthropic models you need to set the `ANTHROPIC_API_KEY` [env var](https://www.val.town/settings/environment-variables).
10* Create a [Val Town API token](https://www.val.town/settings/api), open the browser preview of this val, and use the API token as the password to log in.

webpage_summarizermain.tsx4 matches

@ubixsnow•Updated 6 months ago
104 const webpageText = await webpageResponse.text();
105
106 // Use OpenAI as Claude proxy
107 const { OpenAI } = await import("https://esm.town/v/std/openai");
108 const openai = new OpenAI();
109
110 const completion = await openai.chat.completions.create({
111 messages: [
112 {

travelSurveyAppmain.tsx3 matches

@ntontischris•Updated 6 months ago
47 async function generateRecommendation() {
48 try {
49 const { OpenAI } = await import("https://esm.town/v/std/openai");
50 const openai = new OpenAI();
51
52 const completion = await openai.chat.completions.create({
53 messages: [
54 {

lang_codemain.tsx6 matches

@faseeu•Updated 6 months ago
6
7// Updated LangChain-compatible imports
8import { OpenAI } from "https://esm.town/v/std/openai";
9
10// Custom LangChain-like Workflow
11class CodeGenerationWorkflow {
12 private openai: OpenAI;
13
14 constructor() {
15 this.openai = new OpenAI();
16 }
17
39 const fullPrompt = baseCodePrompt.format({ prompt });
40
41 const completion = await this.openai.chat.completions.create({
42 messages: [{ role: "user", content: fullPrompt }],
43 model: "gpt-4o-mini",
66 const fullPrompt = reviewPrompt.format({ baseCode });
67
68 const completion = await this.openai.chat.completions.create({
69 messages: [{ role: "user", content: fullPrompt }],
70 model: "gpt-4o-mini",
91 const fullPrompt = docPrompt.format({ code });
92
93 const completion = await this.openai.chat.completions.create({
94 messages: [{ role: "user", content: fullPrompt }],
95 model: "gpt-4o-mini",

openai-client1 file match

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