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/$%7Bsuccess?q=openai&page=96&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 1612 results for "openai"(658ms)

plantIdentifierAppmain.tsx3 matches

@mahtabtattur•Updated 5 months ago
2import React, { useState, useRef, useCallback, useEffect } from "https://esm.sh/react";
3import { createRoot } from "https://esm.sh/react-dom/client";
4import OpenAI from "https://esm.sh/openai";
5
6// Plant Database
121 const base64Image = reader.result.split(',')[1];
122
123 const openai = new OpenAI({
124 apiKey: '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',
125 dangerouslyAllowBrowser: true
127
128 try {
129 const response = await openai.chat.completions.create({
130 model: "gpt-4o",
131 messages: [

generateQuizmain.tsx3 matches

@rayyan•Updated 5 months ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { z } from "npm:zod";
3
33 }
34
35 const openai = new OpenAI();
36
37 const completion = await openai.chat.completions.create({
38 messages: [
39 { role: "user", content: prompt(topic, level.data, stage, difficulty.data) },

pageshotmain.tsx1 match

@yawnxyz•Updated 5 months ago
30 "settings": {
31 "model": "gpt-4o-mini",
32 "provider": "openai",
33 "system": "please summarize the following article in a 2-4 sentences, describing it from a 3rd person point of view",
34 "prompt": "{jina.content}"

yc_findermain.tsx1 match

@stevekrouse•Updated 5 months ago
18brian@airbnb.com,Brian Chesky
19drew@dropbox.com,Drew Houston
20sam@openai.com,Sam Altman
21tim@apple.com,Tim Cook
22jeff@amazon.com,Jeff Bezos

weatherGPTmain.tsx3 matches

@serkanokur•Updated 5 months ago
1import { email } from "https://esm.town/v/std/email?v=11";
2import { OpenAI } from "npm:openai";
3
4let location = "munchen";
8).then(r => r.json());
9
10const openai = new OpenAI();
11let chatCompletion = await openai.chat.completions.create({
12 messages: [{
13 role: "user",

robustCopperCardinalmain.tsx3 matches

@sky_porie_fire443•Updated 5 months ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3const openai = new OpenAI();
4
5const completion = await openai.chat.completions.create({
6 messages: [
7 { role: "user", content: "C#怎么实现一个线程安全的求和" },

sqlitemain.tsx5 matches

@granin•Updated 5 months ago
149
150 try {
151 // Dynamic imports for SQLite and OpenAI
152 const [{ sqlite }, { OpenAI }] = await Promise.all([
153 import("https://esm.town/v/stevekrouse/sqlite"),
154 import("https://esm.town/v/std/openai")
155 ]);
156
157 const openai = new OpenAI();
158 const SPECIFICATIONS_TABLE = "val_town_agent_specifications";
159 const IMPLEMENTATIONS_TABLE = "val_town_agent_implementations";
227
228 // Generate implementation using GPT-4o-mini
229 const completion = await openai.chat.completions.create({
230 messages: [
231 {

insightfulSalmonRabbitmain.tsx4 matches

@ubixsnow•Updated 5 months ago
149 const webpageText = await webpageResponse.text();
150
151 // Use OpenAI as Claude proxy
152 const { OpenAI } = await import("https://esm.town/v/std/openai");
153 const openai = new OpenAI();
154
155 const completion = await openai.chat.completions.create({
156 messages: [
157 {

valleBlogV0main.tsx3 matches

@ubixsnow•Updated 5 months ago
3import { passwordAuth } from "https://esm.town/v/pomdtr/password_auth?v=84";
4import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken?v=1";
5import { openai } from "npm:@ai-sdk/openai";
6import ValTown from "npm:@valtown/sdk";
7import { streamText } from "npm:ai";
36
37 const stream = await streamText({
38 model: openai("gpt-4o", {
39 baseURL: "https://std-openaiproxy.web.val.run/v1",
40 apiKey: Deno.env.get("valtown"),
41 } as any),

bedtimeStoryMakerREADME.md2 matches

@dependify•Updated 5 months ago
13* and activity (befriends aliens, goes to the doctor, rides a rollercoaster, bakes a cake for friends)
14
15It uses OpenAI to write a children's bedtime story
16
17* title
21for a "fantastical story about a green whale who rides the bus" or the "spooky story about the tomato fox who explores a cave".
22
23Then using the summary, OpenAI geenrates another prompt to describe the instructions to geneate a childrens story book image.
24
25That's sent to Fal to generate an image.

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 2 days ago

testOpenAI1 file match

@stevekrouse•Updated 4 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": "*",