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?q=openai&page=112&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 2502 results for "openai"(1912ms)

Wills-AI-Assistant.cursorrules4 matches

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

fortuitousSalmonFoxmain.tsx2 matches

@Luchydra•Updated 2 months ago
6import React from "https://esm.sh/react@18.2.0";
7import { blob } from "https://esm.town/v/std/blob";
8import { OpenAI } from "https://esm.town/v/std/openai";
9import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
10
305export default async function server(request: Request): Promise<Response> {
306 const KEY = "fortuitousSalmonFox";
307 const openai = new OpenAI();
308 const url = new URL(request.url);
309

Girlswithjuicemain.tsx2 matches

@Luchydra•Updated 2 months ago
6import React from "https://esm.sh/react@18.2.0";
7import { blob } from "https://esm.town/v/std/blob";
8import { OpenAI } from "https://esm.town/v/std/openai";
9import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
10
305export default async function server(request: Request): Promise<Response> {
306 const KEY = "Girlswithjuice";
307 const openai = new OpenAI();
308 const url = new URL(request.url);
309

lustrousApricotParakeetmain.tsx2 matches

@Luchydra•Updated 2 months ago
6import React from "https://esm.sh/react@18.2.0";
7import { blob } from "https://esm.town/v/std/blob";
8import { OpenAI } from "https://esm.town/v/std/openai";
9import { sqlite } from "https://esm.town/v/stevekrouse/sqlite";
10
305export default async function server(request: Request): Promise<Response> {
306 const KEY = "lustrousApricotParakeet";
307 const openai = new OpenAI();
308 const url = new URL(request.url);
309

habitTrackerAppmain.tsx3 matches

@shouser•Updated 2 months ago
19async function generateMotivation(userProgress) {
20 try {
21 const { OpenAI } = await import("https://esm.town/v/std/openai");
22 const openai = new OpenAI();
23
24 const motivationPrompt = `Generate a highly personalized, inspiring message for someone who has ${userProgress.totalHabits} habits, ${userProgress.completedHabits} completed habits, and an average streak of ${userProgress.averageStreak} days. Make it motivational and specific.`;
25
26 const response = await openai.chat.completions.create({
27 model: "gpt-4o-mini",
28 messages: [{ role: "user", content: motivationPrompt }],

stevensDemo.cursorrules4 matches

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

Bates_bot.cursorrules4 matches

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

stevensDemo.cursorrules4 matches

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

MyPersonalBothandleTelegramMessage.ts4 matches

@lukashakkarainen•Updated 2 months ago
1import { Bot, webhookCallback } from "https://deno.land/x/grammy@v1.35.0/mod.ts";
2import { DateTime } from "https://esm.sh/luxon@3.4.4";
3import { OpenAI } from "npm:openai";
4import { backstory } from "./backstory.ts";
5import { formatMemoriesForPrompt, getRelevantMemories } from "./memoryUtils.ts";
113 */
114async function analyzeMessageContent(
115 aiClient: OpenAI,
116 username,
117 messageText,
314 try {
315 // Get Anthropic API key from environment
316 const apiKey = Deno.env.get("OPENAI_API_KEY");
317 if (!apiKey) {
318 console.error("Open AI API key is not configured.");
324
325 // Initialize Anthropic client
326 const client = new OpenAI({
327 apiKey: apiKey,
328 });

stevensDemo.cursorrules4 matches

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

openai2 file matches

@wangqiao1234•Updated 5 days ago

openaiproxy2 file matches

@wangqiao1234•Updated 5 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