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%22Optional%20title%22?q=openai&page=59&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 3244 results for "openai"(1518ms)

stevensDemo.cursorrules4 matches

@raafaadal•Updated 1 month 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" },

PineconeIndexPineconeIndex1 match

@peterqliu•Updated 1 month ago
78 const {model, modelToken} = this.options;
79 const response = await axios.post(
80 "https://api.openai.com/v1/embeddings",
81 {model, input: text },
82 {

dotcomWordle.tsx1 match

@petermillspaugh•Updated 1 month ago
119 for $3.5m, and <code>aunty.com</code>{" "}
120 for $60k. These prices are, of course, negotiable. I can't imagine anyone paying more for{" "}
121 <code>craze.com</code> than OpenAI paid for <code>chat.com</code>{" "}
122 a couple years ago, for example. In the book I'll cover how these aftermarkets work and what shady behavior
123 goes on behind the scenes.

Townie-3system_prompt.txt4 matches

@dinavinter•Updated 1 month ago
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" },

Townie-3.cursorrules4 matches

@dinavinter•Updated 1 month 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" },
rss

rssfeeds.json1 match

@artivilla•Updated 1 month ago
13 ["programming", "AI"]
14 ],
15 ["https://openai.com/news/rss.xml", ["AI"]],
16 [
17 "https://raw.githubusercontent.com/Olshansk/rss-feeds/main/feeds/feed_anthropic_news.xml",

silomain.tsx6 matches

@join•Updated 1 month ago
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3
4// --- AI BEHAVIORAL GUIDELINES & PROMPTS ---
703 const url = new URL(req.url);
704 const action = url.searchParams.get("action");
705 const openai = new OpenAI();
706
707 if (req.method === "GET") {
717 case "startGame": {
718 const { archetypes } = body;
719 const completion = await openai.chat.completions.create({
720 model: "gpt-4o",
721 messages: [
743 }
744
745 const completion = await openai.chat.completions.create({
746 model: "gpt-4o",
747 messages: [
762 case "evaluateGuess": {
763 const { guess, targetGuest } = body;
764 const completion = await openai.chat.completions.create({
765 model: "gpt-4o",
766 messages: [
781 case "parseCommand": {
782 const { command, availableActions } = body;
783 const completion = await openai.chat.completions.create({
784 model: "gpt-4o",
785 messages: [

untitled-8111emailParser.ts5 matches

@wolf•Updated 1 month ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3interface Email {
116
117/**
118 * Extract order information from email using OpenAI
119 */
120async function extractOrderInfo(email: Email): Promise<OrderInfo> {
121 const openai = new OpenAI();
122
123 // Combine text and HTML content, preferring text
183
184 try {
185 const completion = await openai.chat.completions.create({
186 messages: [
187 { role: "system", content: "You are a precise email parser that extracts order information and returns only valid JSON." },
195 const response = completion.choices[0]?.message?.content?.trim();
196 if (!response) {
197 throw new Error("No response from OpenAI");
198 }
199

dronesmain.tsx3 matches

@join•Updated 1 month ago
1// @ts-ignore
2import { OpenAI } from "https://esm.town/v/std/openai?v=4";
3
4// --- AI BEHAVIORAL GUIDELINES ---
722 if (req.method === "POST" && action === "deconflict") {
723 try {
724 const openai = new OpenAI();
725 const { droneA, droneB } = await req.json();
726
731 const userMessage = `Resolve conflict. Drone A: ${JSON.stringify(droneA)}. Drone B: ${JSON.stringify(droneB)}.`;
732
733 const completion = await openai.chat.completions.create({
734 model: "gpt-4o",
735 messages: [

stevensDemo.cursorrules4 matches

@yudhise•Updated 1 month 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" },

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