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/image-url.jpg%20%22Image%20title%22?q=openai&page=119&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 3227 results for "openai"(3722ms)

Townie.cursorrules4 matches

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

Budgetbudget.ts3 matches

@Benmichaelx•Updated 3 months ago
2
3import { Hono } from "https://esm.sh/hono@3.11.7";
4import { OpenAI } from "https://esm.town/v/std/openai";
5import type { BudgetData, BudgetAnalysis, Recommendation } from "../../shared/types.ts";
6import {
133 // Try to enhance recommendations with AI
134 try {
135 const openai = new OpenAI();
136
137 const prompt = `As a financial advisor, analyze this budget and provide 3-5 specific, actionable recommendations:
166Focus on practical, specific advice based on the expense categories and financial health.`;
167
168 const completion = await openai.chat.completions.create({
169 messages: [{ role: "user", content: prompt }],
170 model: "gpt-4o-mini",

BudgetREADME.md1 match

@Benmichaelx•Updated 3 months ago
50- **Database**: SQLite for data persistence
51- **Styling**: TailwindCSS
52- **AI**: OpenAI for intelligent recommendations

Towniesystem_prompt.txt4 matches

@Njidenwa•Updated 3 months 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" },

Townie.cursorrules4 matches

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

untitled-288quotes.ts3 matches

@Ruepearl•Updated 3 months ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { blob } from "https://esm.town/v/std/blob";
4import type { Quote, BookCategory, QuoteRequest, QuoteResponse, QuoteHistory, LinkedInHashtags } from "../../shared/types.ts";
6const quotes = new Hono();
7
8const openai = new OpenAI();
9
10const BOOK_THEMES = {
123Respond with just the quote text, no attribution or quotation marks.`;
124
125 const completion = await openai.chat.completions.create({
126 messages: [{ role: "user", content: prompt }],
127 model: "gpt-4o-mini",

untitled-288hashtags.ts3 matches

@Ruepearl•Updated 3 months ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import type {
4 LinkedInHashtags,
9
10const hashtags = new Hono();
11const openai = new OpenAI();
12
13// LinkedIn hashtag database for different categories and trending topics
131
132 try {
133 const completion = await openai.chat.completions.create({
134 messages: [{ role: "user", content: aiPrompt }],
135 model: "gpt-4o-mini",

soulandfoodREADME.md1 match

@that_girl•Updated 3 months ago
17- **Backend**: Hono API framework
18- **Database**: SQLite for user data and engagement tracking
19- **AI**: OpenAI for mood-based affirmations
20- **Styling**: African-inspired earth tones with cultural patterns
21

soulandfoodmood.ts5 matches

@that_girl•Updated 3 months ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { createMoodEntry, getUserMoodEntries, getMoodStats, trackEngagement } from "../database/queries.ts";
4import type { MoodEntry, APIResponse } from "../../shared/types.ts";
6export const moodRoutes = new Hono();
7
8// Initialize OpenAI for affirmations
9const openai = new OpenAI();
10
11// Submit mood check-in
29 : `Generate a gentle, comforting affirmation in English for someone feeling ${mood}. The affirmation should be culturally sensitive, inspired by African wisdom, and encouraging. Maximum 2 sentences.`;
30
31 const completion = await openai.chat.completions.create({
32 messages: [
33 {
195
196 try {
197 const completion = await openai.chat.completions.create({
198 messages: [
199 {

untitled-288README.md1 match

@Ruepearl•Updated 3 months ago
32- Backend: Hono (TypeScript)
33- Frontend: React with TypeScript
34- AI: OpenAI GPT for quote generation
35- Storage: Val Town Blob for quote history
36- Styling: TailwindCSS

openai-usage1 file match

@nbbaier•Updated 17 hours ago

hello-realtime5 file matches

@jubertioai•Updated 3 days ago
Sample app for the OpenAI Realtime API
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