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/$1?q=openai&page=32&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 2138 results for "openai"(795ms)

FlexCalformatting.ts3 matches

@malcolmocean•Updated 2 weeks ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3// Interface for formatting rules
123export async function extractFlightInfoWithAI(event: any): Promise<string> {
124 try {
125 const openai = new OpenAI();
126
127 const prompt = `
135 `;
136
137 const completion = await openai.chat.completions.create({
138 messages: [
139 { role: "system", content: "You extract airport codes from flight information." },
vtProjectSearch

vtProjectSearchcomponents.tsx2 matches

@maxm•Updated 2 weeks ago
1246 <a href="?q=function" className="example-link">function</a>
1247 <a href="?q=discord" className="example-link">discord</a>
1248 <a href="?q=openai" className="example-link">openai</a>
1249 <a href="?q=react" className="example-link">react</a>
1250 </div>
1400 <a href="?q=function" className="example-link">function</a>
1401 <a href="?q=discord" className="example-link">discord</a>
1402 <a href="?q=openai" className="example-link">openai</a>
1403 <a href="?q=react" className="example-link">react</a>
1404 </div>

val-town-blogget-old-posts.ts5 matches

@pomdtr•Updated 2 weeks 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",

TommyAiREADME.md3 matches

@Bcbxbxbxb•Updated 2 weeks ago
29- Maintains context within conversations
30- Generates images based on text descriptions
31- Analyzes uploaded images using OpenAI's vision capabilities
32- Simple rule-based response system
33
47### Backend
48- Built with Hono for routing
49- OpenAI integration for image analysis
50- Val Town image generation service integration
51- Conversation context tracking with support for different message types
57
58### Image Analysis
59- Uses OpenAI's vision capabilities to analyze uploaded images
60- Supports common image formats (JPEG, PNG, etc.)
61- Provides detailed descriptions of image content

TommyAiindex.ts5 matches

@Bcbxbxbxb•Updated 2 weeks ago
4
5// For image analysis
6import { OpenAI } from "https://esm.town/v/std/openai";
7
8const app = new Hono();
9const openai = new OpenAI();
10
11// Unwrap Hono errors to see original error details
172}
173
174// Image analysis function using OpenAI
175async function analyzeImage(imageData: string) {
176 try {
178 const base64Image = imageData.split(',')[1];
179
180 // Call OpenAI API to analyze the image
181 const response = await openai.chat.completions.create({
182 model: "gpt-4o",
183 messages: [

stevensDemo.cursorrules4 matches

@davidjhall•Updated 2 weeks 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" },

groq-apiai.ts1 match

@cameronpak•Updated 2 weeks ago
1import { fileToBase64 } from "https://esm.town/v/stevekrouse/fileToDataURL";
2import { Groq } from "npm:groq-sdk";
3import { toFile } from "npm:openai";
4
5const groq = new Groq({

promptherooptimize.ts6 matches

@heybunny•Updated 2 weeks ago
1import { Hono } from 'https://esm.sh/hono@3.11.7';
2import { OpenAI } from "https://esm.town/v/std/openai";
3
4const app = new Hono();
5
6// Initialize OpenAI client
7const openai = new OpenAI();
8
9// Test a prompt with GPT
17 }
18
19 const completion = await openai.chat.completions.create({
20 messages: [
21 { role: "user", content: prompt }
574. A brief explanation of why each alternative might perform better`;
58
59 const completion = await openai.chat.completions.create({
60 messages: [
61 { role: "system", content: systemPrompt },
984. A percentage score (0-100%) for each prompt based on the criteria`;
99
100 const completion = await openai.chat.completions.create({
101 messages: [
102 { role: "system", content: systemPrompt },

promptheroREADME.md1 match

@heybunny•Updated 2 weeks ago
16- **Backend**: Hono.js API framework
17- **Database**: SQLite for storing prompts and history
18- **AI**: OpenAI GPT models
19
20## Project Structure

OpenTowniesystem_prompt.txt4 matches

@h0a•Updated 2 weeks 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" },

openai-client1 file match

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