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/...?q=openai&page=8&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 2236 results for "openai"(3003ms)

ValTownBlog-2get-old-posts.ts5 matches

@wolf•Updated 5 days ago
207 },
208 {
209 "title": "An Introduction to OpenAI fine-tuning",
210 "slug": "an-introduction-to-openai-fine-tuning",
211 "link": "/blog/an-introduction-to-openai-fine-tuning",
212 "description": "How to customize OpenAI to your liking",
213 "pubDate": "Fri, 25 Aug 2023 00:00:00 GMT",
214 "author": "Steve Krouse",
439 "link": "/blog/val-town-newsletter-16",
440 "description":
441 "Our seed round, growing team, Codeium completions, @std/openai, and more",
442 "pubDate": "Mon, 22 Apr 2024 00:00:00 GMT",
443 "author": "Steve Krouse",

ValTownBlog-2.cursorrules4 matches

@wolf•Updated 5 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" },

autonomous-valagent.tsx2 matches

@a01•Updated 5 days ago
1import { anthropic } from "npm:@ai-sdk/anthropic";
2import { openai } from "npm:@ai-sdk/openai";
3import { generateText, streamText } from "npm:ai";
4import { getSystemPrompt } from "./prompt.tsx";
31 const maxSteps = 10;
32
33 const model = openai("gpt-4.1");
34
35 const options = {

templateTwitterAlert2main.tsx3 matches

@charmaine•Updated 5 days ago
1import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
2import { socialDataSearch, Tweet } from "https://esm.town/v/stevekrouse/socialDataSearch";
3import { OpenAI } from "https://esm.town/v/std/openai";
4
5interface AnalyzedTweet {
16 if (!tweets.length) return [];
17
18 const openai = new OpenAI();
19
20 const tweetsText = tweets.map((tweet, index) =>
45
46 try {
47 const completion = await openai.chat.completions.create({
48 messages: [{ role: "user", content: prompt }],
49 model: "gpt-4o-mini",

Storyquestmain.tsx3 matches

@Get•Updated 5 days ago
236
237export default async function(req) {
238 const { OpenAI } = await import("https://esm.town/v/std/openai");
239 const CORS_HEADERS = {
240 "Access-Control-Allow-Origin": "*",
247 const action = url.searchParams.get("action");
248 const sourceUrl = import.meta.url.replace("esm.town", "val.town");
249 const openai = new OpenAI();
250 const jsonResponse = (body, status) =>
251 new Response(JSON.stringify(body), { status, headers: { ...CORS_HEADERS, "Content-Type": "application/json" } });
253 async function callAI(systemPrompt, userMessage) {
254 try {
255 const response = await openai.chat.completions.create({
256 model: "gpt-4o",
257 messages: [{ role: "system", content: systemPrompt }, { role: "user", content: userMessage }],

Galactasummarize.tsx2 matches

@defunkt•Updated 5 days ago
1import askOpenAI from "./openai.tsx"
2
3const PROMPT = `
125 const data = matchData(matchJson)
126 const message = PROMPT + "\n\n" + JSON.stringify(data)
127 return await askOpenAI(message)
128}
129

stevensDemo-remixed.cursorrules4 matches

@katzenj•Updated 5 days 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" },

lexi2main.tsx4 matches

@Get•Updated 5 days ago
854
855export default async function(req: Request) {
856 const { OpenAI } = await import("https://esm.town/v/std/openai");
857 const { PDFExtract } = await import("npm:pdf.js-extract");
858
868 const action = url.searchParams.get("action");
869 const sourceUrl = import.meta.url.replace("esm.town", "val.town");
870 const openai = new OpenAI();
871 const MAX_TEXT_SUGGEST = 20000;
872 const MAX_TEXT_ANALYZE = 30000;
897 agentName: string,
898 ): Promise<object> {
899 log.push({ agent: agentName, type: "step", message: `Calling OpenAI gpt-4o...` });
900 try {
901 const response = await openai.chat.completions.create({
902 model: "gpt-4o",
903 messages: [{ role: "system", content: systemPrompt }, { role: "user", content: userMessage }],

autonomous-valREADME.md1 match

@a01•Updated 5 days ago
9Configure the following variables in your environment:
10- `AGENT_API_KEY` (This is a secure token that you choose to secure the agent.tsx POST endpoint)
11- `OPENAI_API_KEY` (An OpenAI API Key)
12- `EXA_API_KEY` (Optional, though needed if you use the web search tool)
13

emailtesttrigger1 match

@universe•Updated 5 days ago
2import process from "node:process";
3import { marked } from "npm:marked";
4import { OpenAI } from "npm:openai";
5
6function pm(...lines: string[]): string {

openai-client1 file match

@cricks_unmixed4u•Updated 1 week ago

openai_enrichment6 file matches

@stevekrouse•Updated 1 week ago
kwhinnery_openai
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