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=128&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"(3012ms)

autonomous-valREADME.md1 match

@abrinz•Updated 3 months ago
9Configure the following variables in your environment:
10- `AGENT_API_KEY` (This is a secure token that you choose to secure the agent.tsx POST endpoint)
11- `OPENAI_API_KEY` (An OpenAI API Key)
12- `EXA_API_KEY` (Optional, though needed if you use the web search tool)
13

blogget-old-posts.ts5 matches

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

MCPindex.ts2 matches

@c15r•Updated 3 months ago
128 </div>
129 <div class="border rounded-lg p-4">
130 <h3 class="font-semibold text-orange-600 mb-2">🤖 OpenAI</h3>
131 <ul class="text-sm text-gray-600 space-y-1">
132 <li>• openai_chat</li>
133 </ul>
134 </div>

stevensDemo.cursorrules4 matches

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

my-first-valai-analysis.ts7 matches

@Mahi77•Updated 3 months ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import type { AnalysisResponse } from "../../shared/types.ts";
3
4const openai = new OpenAI();
5
6export async function analyzeImage(imageData: string, fileName: string): Promise<AnalysisResponse> {
9 const base64Data = imageData.replace(/^data:image\/[a-z]+;base64,/, '');
10
11 const response = await openai.chat.completions.create({
12 model: "gpt-4o-mini",
13 messages: [
88 const audioFile = new File([audioBlob], fileName, { type: 'audio/wav' });
89
90 const transcription = await openai.audio.transcriptions.create({
91 file: audioFile,
92 model: "whisper-1",
96
97 // Analyze the transcribed text
98 const textAnalysis = await openai.chat.completions.create({
99 model: "gpt-4o-mini",
100 messages: [
160 // In practice, you'd need to extract frames from the video
161
162 const response = await openai.chat.completions.create({
163 model: "gpt-4o-mini",
164 messages: [
212export async function generateSearchSuggestions(query: string): Promise<string[]> {
213 try {
214 const response = await openai.chat.completions.create({
215 model: "gpt-4o-mini",
216 messages: [

my-first-valREADME.md4 matches

@Mahi77•Updated 3 months ago
8- **Multi-Media Support**: Image, video, and audio recognition
9- **Real-time Capture**: In-browser media capture capabilities
10- **AI Analysis**: Powered by OpenAI's vision and audio models
11- **Intelligent Search**: Find similar content based on descriptions
12- **Secure Storage**: User data and media metadata stored securely
42## Technology Stack
43
44- **Backend**: Hono, SQLite, OpenAI API
45- **Frontend**: React, TailwindCSS
46- **AI/ML**: OpenAI GPT-4 Vision, Whisper
47- **Storage**: Val Town Blob storage
48- **Authentication**: JWT-based sessions
51
521. Set up environment variables:
53 - `OPENAI_API_KEY`: Your OpenAI API key
54 - `JWT_SECRET`: Secret for JWT token signing
55

blog-3get-old-posts.ts5 matches

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

fuadmain.tsx15 matches

@mees•Updated 3 months ago
15
16 // Get your API key from Val.town environment variables
17 const OPENAI_API_KEY = Deno.env.get("OPENAI_API_KEY");
18 const ASSISTANT_ID = Deno.env.get("ASSISTANT_ID");
19
20 if (!OPENAI_API_KEY || !ASSISTANT_ID) {
21 throw new Error(
22 "Missing API key or Assistant ID in environment variables. Please set OPENAI_API_KEY and ASSISTANT_ID.",
23 );
24 }
29 if (!threadId || threadId === "") {
30 console.log("Creating new thread...");
31 const threadResponse = await fetch("https://api.openai.com/v1/threads", {
32 method: "POST",
33 headers: {
34 "Authorization": `Bearer ${OPENAI_API_KEY}`,
35 "Content-Type": "application/json",
36 "OpenAI-Beta": "assistants=v2",
37 },
38 body: JSON.stringify({}),
51 // Add message and run assistant
52 console.log("Running assistant...");
53 const runResponse = await fetch(`https://api.openai.com/v1/threads/${threadId}/runs`, {
54 method: "POST",
55 headers: {
56 "Authorization": `Bearer ${OPENAI_API_KEY}`,
57 "Content-Type": "application/json",
58 "OpenAI-Beta": "assistants=v2",
59 },
60 body: JSON.stringify({
87
88 const statusResponse = await fetch(
89 `https://api.openai.com/v1/threads/${threadId}/runs/${runId}`,
90 {
91 headers: {
92 "Authorization": `Bearer ${OPENAI_API_KEY}`,
93 "OpenAI-Beta": "assistants=v2",
94 },
95 },
114 console.log("Getting messages...");
115 const messagesResponse = await fetch(
116 `https://api.openai.com/v1/threads/${threadId}/messages?order=desc&limit=1`,
117 {
118 headers: {
119 "Authorization": `Bearer ${OPENAI_API_KEY}`,
120 "OpenAI-Beta": "assistants=v2",
121 },
122 },

Glancer3Remix.cursorrules4 matches

@stevekrouse•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" },

regexToBrainrotmain.tsx4 matches

@iostreamer•Updated 3 months ago
300 { getRandomRegexExplanation, saveRegexExplanation, getRegexExplanationById },
301 ReactMarkdown,
302 { OpenAI },
303 { renderToString },
304 { jsx, jsxs, Fragment },
306 import("https://esm.town/v/stainless_em/brainrotdb"),
307 import("npm:react-markdown@7"),
308 import("https://esm.town/v/std/openai"),
309 import("npm:react-dom@19/server.browser"),
310 import("npm:react@19/jsx-runtime"),
336 }
337
338 const openai = new OpenAI();
339
340 const abortController = new AbortController();
341 const completion = await openai.chat.completions.create({
342 messages: [
343 {

openai-usage1 file match

@nbbaier•Updated 21 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