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=77&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 1675 results for "openai"(1050ms)

blogIdeaGeneratorAppREADME.md1 match

@melissanf•Updated 2 months ago
15### Tech Stack
16* Townie AI – AI-based automation
17* OpenAI API – For generating blog content
18* Built-in Databases – To store and retrieve topics (if needed)
19* How to Deploy & Share

productiveIndigoJayREADME.md1 match

@melissanf•Updated 2 months ago
25## **Tech Stack**
26- **Townie AI** – AI-based automation
27- **OpenAI API** – For generating blog content
28- **Built-in Databases** – To store and retrieve topics (if needed)
29

shoppingPlatformAImain.tsx3 matches

@Priyansh•Updated 2 months ago
59 async function generateAIRecommendations() {
60 try {
61 const { OpenAI } = await import("https://esm.town/v/std/openai");
62 const openai = new OpenAI();
63
64 const recommendations = await openai.chat.completions.create({
65 messages: [
66 {

priyanshCartoonAppmain.tsx4 matches

@Priyansh•Updated 2 months ago
71 async function generateAIDescription() {
72 try {
73 const { OpenAI } = await import("https://esm.town/v/std/openai");
74 const openai = new OpenAI();
75
76 const aiVideoCompletion = await openai.chat.completions.create({
77 messages: [
78 {
85 });
86
87 const aiDescription = await openai.chat.completions.create({
88 messages: [
89 {

aiVideoAppmain.tsx4 matches

@Priyansh•Updated 2 months ago
242
243export default async function server(request: Request): Promise<Response> {
244 const { OpenAI } = await import("https://esm.town/v/std/openai");
245 const openai = new OpenAI();
246
247 const url = new URL(request.url);
254 try {
255 // Simulated video analysis (in a real scenario, you'd use a more advanced video processing service)
256 const analysisResponse = await openai.chat.completions.create({
257 messages: [
258 {
288 try {
289 // Generate video concept
290 const conceptResponse = await openai.chat.completions.create({
291 messages: [
292 {

priyanshSocialMediaAppmain.tsx5 matches

@Priyansh•Updated 2 months ago
201export default async function server(request: Request): Promise<Response> {
202 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
203 const { OpenAI } = await import("https://esm.town/v/std/openai");
204 const KEY = "priyanshSocialMediaApp";
205 const SCHEMA_VERSION = 5;
208
209 const url = new URL(request.url);
210 const openai = new OpenAI();
211
212 // New Vision Analysis Endpoint
222 );
223
224 // Use OpenAI Vision API
225 const visionResponse = await openai.chat.completions.create({
226 model: "gpt-4-vision-preview",
227 messages: [
271 `;
272
273 const textCompletion = await openai.chat.completions.create({
274 messages: [
275 { role: "system", content: "You are a creative content generator for social media templates." },

priyanshAIToolmain.tsx3 matches

@Priyansh•Updated 2 months ago
81export default async function server(request: Request): Promise<Response> {
82 if (request.method === "POST" && new URL(request.url).pathname === "/chat") {
83 const { OpenAI } = await import("https://esm.town/v/std/openai");
84 const openai = new OpenAI();
85
86 try {
87 const { messages } = await request.json();
88 const completion = await openai.chat.completions.create({
89 messages: messages,
90 model: "gpt-4o-mini",

victoriousAmberRabbitmain.tsx3 matches

@Priyansh•Updated 2 months ago
12 setLoading(true);
13 try {
14 const { OpenAI } = await import("https://esm.town/v/std/openai");
15 const openai = new OpenAI();
16
17 const completion = await openai.chat.completions.create({
18 messages: [
19 { role: "system", content: "You are a pro-level AI assistant combining DeepSweek and ChatGPT capabilities. Provide comprehensive, nuanced responses." },

deepsweekAIToolmain.tsx3 matches

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

VALLEREADME.md1 match

@anupd912•Updated 2 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.

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 1 week ago

testOpenAI1 file match

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