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/$%7Bsuccess?q=openai&page=25&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 1580 results for "openai"(1008ms)

stevensDemo.cursorrules4 matches

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

stevensDemo_1generateFunFacts.ts5 matches

@Suqi0626Updated 2 weeks ago
2import { nanoid } from "https://esm.sh/nanoid@5.0.5";
3import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
4import { Configuration, OpenAIApi } from "npm:openai";
5
6const TABLE_NAME = `memories`;
77async function generateFunFacts(previousFacts) {
78 try {
79 const apiKey = Deno.env.get("OPENAI_API_KEY");
80 if (!apiKey) {
81 console.error("OpenAI API key is not configured.");
82 return null;
83 }
84
85 const configuration = new Configuration({ apiKey });
86 const openai = new OpenAIApi(configuration);
87
88 const previousFactsText = previousFacts
130`;
131
132 const completion = await openai.createChatCompletion({
133 model: "gpt-4", // 可以选择 "gpt-3.5-turbo"
134 messages: [

MyPersonalBot.cursorrules4 matches

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

stevensDemo.cursorrules4 matches

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

stevensDemo_1.cursorrules4 matches

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

stevensDemo.cursorrules4 matches

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

o3Artmain.tsx1 match

@dcm31Updated 2 weeks ago
2 * Paste this whole file into a new Val and hit save.
3 * It renders an endlessly swirling radial vortex with shifting colours.
4 * – ChatGPT (OpenAI o3) 2025‑04‑17
5 */
6

wondrousMaroonPeafowlmain.tsx3 matches

@allUpdated 2 weeks ago
67 console.log("🎤 Sending request to Groq Whisper API");
68 const start = Date.now();
69 const response = await fetch("https://api.groq.com/openai/v1/audio/transcriptions", {
70 method: "POST",
71 headers: {
155 console.log("🔵 Sending request to Groq API");
156 const start = Date.now();
157 const response = await fetch("https://api.groq.com/openai/v1/chat/completions", {
158 method: "POST",
159 headers: {
211 console.log("🔊 Sending request to Groq Speech API");
212 const start = Date.now();
213 const response = await fetch("https://api.groq.com/openai/v1/audio/speech", {
214 method: "POST",
215 headers: {

stevensDemo.cursorrules4 matches

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

testOpenAI1 file match

@stevekrouseUpdated 1 day ago

testOpenAI1 file match

@shouserUpdated 3 days ago
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",