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//%22$%7Bconfig.siteUrl%7D/%22?q=openai&page=4&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"(2832ms)

Llama-4-Maverick-03main.tsx1 match

@aibotcommander•Updated 2 days ago
49 try {
50 response = await fetch(
51 "https://api.groq.com/openai/v1/chat/completions",
52 {
53 method: "POST",

Llama-4-Maverick-01main.tsx1 match

@aibotcommander•Updated 2 days ago
27 try {
28 response = await fetch(
29 "https://api.groq.com/openai/v1/chat/completions",
30 {
31 method: "POST",

manga-updates-to-discordAGENTS.md4 matches

@sorcoro•Updated 2 days 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" },

twinmain.ts3 matches

@know•Updated 2 days ago
1// app.ts
2// @ts-ignore
3import { OpenAI } from "https://esm.town/v/std/openai?v=4";
4import { Hono } from "npm:hono@4.4.12";
5
724app.post("/api/interpret-gesture", async (c) => {
725 try {
726 const openai = new OpenAI();
727 const body = await c.req.json();
728 const { thumb, index, middle, ring, pinky } = body || {};
740 }
741
742 const completion = await openai.chat.completions.create({
743 model: "gpt-4o",
744 messages: [

suitemain.ts3 matches

@realtime•Updated 3 days ago
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { Hono } from "npm:hono@4.4.12";
4
63 .join("\n");
64
65 const openai = new OpenAI();
66 const completion = await openai.chat.completions.create({
67 model: "gpt-4o",
68 messages: [

thinkmain.ts5 matches

@realtime•Updated 3 days ago
2import { blob } from "https://esm.town/v/std/blob?v=11";
3// @ts-ignore
4import { OpenAI } from "https://esm.town/v/std/openai?v=4";
5import { Hono } from "npm:hono@4.4.12";
6
73 }
74
75 const openai = new OpenAI();
76 const completion = await openai.chat.completions.create({
77 model: "gpt-4o",
78 messages: [
124 }
125
126 const openai = new OpenAI();
127 const completion = await openai.chat.completions.create({
128 model: "gpt-4o",
129 messages: [

llm-from-urlmain.ts1 match

@raify•Updated 3 days ago
93 const url = new URL(`https://${host}/`);
94 url.pathname = lastMessage ||
95 "You are ChatGPT, a large language model trained by OpenAI.";
96 const assistantReply = (await fetch(url).then((res) => res.text())).replace(
97 /\n-+\nLLM from URL.[^-]+-+$/m,
bible-mcp

bible-mcpAGENTS.md4 matches

@cameronpak•Updated 3 days 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" },

hello-realtimeutils.ts5 matches

@jplhomer•Updated 3 days ago
1const REALTIME_BASE_URL = "https://api.openai.com/v1/realtime";
2const OPENAI_API_KEY = Deno.env.get("OPENAI_API_KEY");
3if (!OPENAI_API_KEY) {
4 throw new Error("🔴 OpenAI API key not configured");
5}
6
24export function makeHeaders(contentType?: string) {
25 const obj: Record<string, string> = {
26 Authorization: `Bearer ${OPENAI_API_KEY}`,
27 };
28 if (contentType) obj["Content-Type"] = contentType;

hello-realtimesip.ts3 matches

@jplhomer•Updated 3 days ago
9sip.post("/", async (c) => {
10 // Verify the webhook.
11 const OPENAI_SIGNING_SECRET = Deno.env.get("OPENAI_SIGNING_SECRET");
12 if (!OPENAI_SIGNING_SECRET) {
13 console.error("🔴 webhook secret not configured");
14 return c.text("Internal error", 500);
15 }
16 const webhook = new Webhook(OPENAI_SIGNING_SECRET);
17 const bodyStr = await c.req.text();
18 let callId: string | undefined;

openai-usage1 file match

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