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/%22mailto:kurt@sachersolutions.ca/%22https:/cdn.jsdelivr.net/npm/@mediapipe/hands@0.4.1646424915/hands.min.js//%22data:image/svg+xml,%3Csvg?q=openai&page=1&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 3245 results for "openai"(1596ms)

Gemini-2-5-Pro-O-01

Gemini-2-5-Pro-O-01main.tsx3 matches

@aibotcommander•Updated 31 mins ago
1import process from "node:process";
2import { OpenAI } from "npm:openai";
3
4const IMAGE_COST = 400;
110}
111
112function createPoeClient(apiKey: string): OpenAI {
113 return new OpenAI({
114 apiKey: apiKey || "YOUR_POE_API_KEY",
115 baseURL: "https://api.poe.com/v1",
Gemini-2-5-Pro-O-02

Gemini-2-5-Pro-O-02main.tsx3 matches

@aibotcommander•Updated 36 mins ago
1import process from "node:process";
2import { OpenAI } from "npm:openai";
3
4const IMAGE_COST = 400;
110}
111
112function createPoeClient(apiKey: string): OpenAI {
113 return new OpenAI({
114 apiKey: apiKey || "YOUR_POE_API_KEY",
115 baseURL: "https://api.poe.com/v1",

zoomtest.cursorrules4 matches

@yawnxyz•Updated 1 hour 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" },

chatterchatStream.js2 matches

@yawnxyz•Updated 2 hours ago
37 language,
38 offset = 0,
39 model = 'openai/gpt-oss-120b',
40 reasoning_effort = 'medium',
41 tools,
54 }
55
56 const isGptOss = typeof model === 'string' && model.startsWith('openai/gpt-oss');
57 const supportsReasoning = isGptOss;
58 const supportsTools = isGptOss;

chatterjobs.js3 matches

@yawnxyz•Updated 2 hours ago
101 language,
102 offset = 0,
103 model = "openai/gpt-oss-120b",
104 reasoning_effort = "medium",
105 tools = [],
118 }
119
120 const isGptOss = typeof model === "string" && model.startsWith("openai/gpt-oss");
121 const supportsReasoning = isGptOss;
122 const supportsTools = isGptOss;
171
172 const baseUrl = (typeof base_url === "string" && base_url.trim()) ? base_url.trim().replace(/\/$/, "") : "";
173 let endpoint = "https://api.groq.com/openai/v1/chat/completions";
174 if (baseUrl) {
175 if (/(\/v\d+)?\/(chat\/)?completions$/i.test(baseUrl)) {

chatterchatCompletion.js2 matches

@yawnxyz•Updated 2 hours ago
3export async function groqChatCompletion(apiKey, payload) {
4 console.log('>>> [groqChatCompletion] Payload:', payload);
5 const response = await fetch('https://api.groq.com/openai/v1/chat/completions', {
6 method: 'POST',
7 headers: {
56 try {
57 const res = await groqChatCompletion(apiKey, {
58 model: 'openai/gpt-oss-120b',
59 messages: [
60 { role: 'system', content: 'Classify the user request as either links or text. Respond with a single token: links or text. Use links if the user appears to want a search results list of sources; use text if the user is asking for an explanation/summary/definition.' },

chatterchatStreamSSE.js3 matches

@yawnxyz•Updated 2 hours ago
36 language,
37 offset = 0,
38 model = 'openai/gpt-oss-120b',
39 reasoning_effort = 'medium',
40 tools = [],
53 }
54
55 const isGptOss = typeof model === 'string' && model.startsWith('openai/gpt-oss');
56 const supportsReasoning = isGptOss;
57 const supportsTools = isGptOss;
108 const encoder = new TextEncoder();
109 const baseUrl = (typeof base_url === 'string' && base_url.trim()) ? base_url.trim().replace(/\/$/, '') : '';
110 let endpoint = 'https://api.groq.com/openai/v1/chat/completions';
111 if (baseUrl) {
112 if (/(\/v\d+)?\/(chat\/)?completions$/i.test(baseUrl)) {

untitled-1522api.ts4 matches

@jessicaocean•Updated 2 hours ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { email } from "https://esm.town/v/std/email";
4import type { ChatRequest, ChatResponse, InviteRequest, InviteDetails } from "../../shared/types.ts";
30
31const api = new Hono();
32const openai = new OpenAI();
33
34// Middleware to ensure user is authenticated
280 const messages = await getConversationMessages(currentConversationId);
281
282 // Prepare messages for OpenAI (exclude the current user message since we'll add it)
283 const chatMessages = messages
284 .filter(m => m.id !== userMessage.id) // Exclude the message we just added
293 try {
294 // Get response from ChatGPT
295 const completion = await openai.chat.completions.create({
296 messages: chatMessages,
297 model: "gpt-4o-mini",

untitled-1522README.md1 match

@jessicaocean•Updated 2 hours ago
49- **Automatic user creation** on first login
50- **Conversation history storage** with full message history
51- **ChatGPT integration** via OpenAI API
52- **Group chat functionality** with role-based permissions
53- **Email invitations** with secure tokens

untitled-1522README.md1 match

@jessicaocean•Updated 2 hours ago
37## Tech Stack
38
39- **Backend**: Hono, LastLogin auth, SQLite, OpenAI, Server-Sent Events
40- **Frontend**: React, TailwindCSS, Real-time SSE connections
41- **Database**: SQLite with participant and invitation tables

openai-usage1 file match

@nbbaier•Updated 1 day ago

hello-realtime5 file matches

@jubertioai•Updated 4 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