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/$%7Bart_info.art.src%7D?q=openai&page=14&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 1569 results for "openai"(1033ms)

stevensDemo.cursorrules4 matches

@fredah•Updated 1 week ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

vt-blogget-old-posts.ts5 matches

@charmaine•Updated 1 week ago
198 },
199 {
200 "title": "An Introduction to OpenAI fine-tuning",
201 "slug": "an-introduction-to-openai-fine-tuning",
202 "link": "/blog/an-introduction-to-openai-fine-tuning",
203 "description": "How to customize OpenAI to your liking",
204 "pubDate": "Fri, 25 Aug 2023 00:00:00 GMT",
205 "author": "Steve Krouse",
417 "slug": "val-town-newsletter-16",
418 "link": "/blog/val-town-newsletter-16",
419 "description": "Our seed round, growing team, Codeium completions, @std/openai, and more",
420 "pubDate": "Mon, 22 Apr 2024 00:00:00 GMT",
421 "author": "Steve Krouse",

MyStevens.cursorrules4 matches

@billogiovanni•Updated 1 week ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

survivor-trackerREADME.md1 match

@prashamtrivedi•Updated 1 week ago
25- Frontend: **React** with **TailwindCSS**
26- Backend: **Hono** framework with SQLite storage
27- AI Guidance: Simulated AI responses (can be replaced with actual OpenAI integration)
28
29## Getting Started

survivor-trackerprocessor.ts12 matches

@prashamtrivedi•Updated 1 week ago
6import { PersonalStatus, DailyLog, Task, TrackStatus } from "../database/queries.ts";
7
8// Interface for OpenAI response
9interface OpenAICompletion {
10 choices: {
11 message: {
16
17// Mock AI function for generating responses
18// In production, replace with actual OpenAI integration
19export const generateAIResponse = async (prompt: string): Promise<string> => {
20 // Simulate AI response generation
58};
59
60// This would be replaced with a real OpenAI call in production
61const callOpenAI = async (prompt: string): Promise<string> => {
62 // Simulate network delay
63 await new Promise(resolve => setTimeout(resolve, 500));
67 /*
68 // Real implementation would look like this:
69 import { OpenAI } from "npm:openai";
70
71 const openai = new OpenAI();
72 const completion = await openai.chat.completions.create({
73 messages: [
74 { role: "system", content: "You are an expert business coach helping an independent consultant execute their 21-day survival plan." },
104
105 // Call AI to generate response
106 return await callOpenAI(filledPrompt);
107};
108
130
131 // Call AI to generate response
132 return await callOpenAI(filledPrompt);
133};
134
170
171 // Call AI to generate response
172 const aiResponse = await callOpenAI(filledPrompt);
173
174 // Parse the response to extract metrics, gaps, and adjustments
198
199 // Call AI to generate response
200 return await callOpenAI(filledPrompt);
201};
202

vt-blogget-old-posts.ts5 matches

@shouser•Updated 1 week ago
198 },
199 {
200 "title": "An Introduction to OpenAI fine-tuning",
201 "slug": "an-introduction-to-openai-fine-tuning",
202 "link": "/blog/an-introduction-to-openai-fine-tuning",
203 "description": "How to customize OpenAI to your liking",
204 "pubDate": "Fri, 25 Aug 2023 00:00:00 GMT",
205 "author": "Steve Krouse",
417 "slug": "val-town-newsletter-16",
418 "link": "/blog/val-town-newsletter-16",
419 "description": "Our seed round, growing team, Codeium completions, @std/openai, and more",
420 "pubDate": "Mon, 22 Apr 2024 00:00:00 GMT",
421 "author": "Steve Krouse",

OpenTowniesystem_prompt.txt4 matches

@jxnblk•Updated 1 week ago
88Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
89
90### OpenAI
91
92```ts
93import { OpenAI } from "https://esm.town/v/std/openai";
94const openai = new OpenAI();
95const completion = await openai.chat.completions.create({
96 messages: [
97 { role: "user", content: "Say hello in a creative way" },
jeeves

jeeves.cursorrules4 matches

@brontojoris•Updated 1 week ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

stevensDemo.cursorrules4 matches

@Tholapz•Updated 1 week ago
100Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
101
102### OpenAI
103```ts
104import { OpenAI } from "https://esm.town/v/std/openai";
105const openai = new OpenAI();
106const completion = await openai.chat.completions.create({
107 messages: [
108 { role: "user", content: "Say hello in a creative way" },

Book_Recommendation_Systemmain.tsx4 matches

@Rogueox•Updated 1 week ago
137
138 // Dynamic AI-powered book recommendations
139 const { OpenAI } = await import("https://esm.town/v/std/openai");
140 const openai = new OpenAI();
141
142 const completion = await openai.chat.completions.create({
143 messages: [
144 {
156
157 // Log the raw response for debugging
158 console.log('Raw OpenAI Response:', completion.choices[0].message.content);
159
160 // Attempt to parse the response, with fallback

testOpenAI1 file match

@shouser•Updated 1 day ago

testOpenAI1 file match

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