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/$%7BsvgDataUrl%7D?q=openai&page=15&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 2248 results for "openai"(1455ms)

Change-Logs-Generatorprocess-commits.tsx3 matches

@hussufo•Updated 1 week ago
5import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
6import { Octokit } from "npm:octokit";
7import { OpenAI } from "https://esm.town/v/std/openai";
8
9// Environment variables, set them in the left sidebar
25 */
26async function generateUserFocusedSummary(fullCommitMessage: string, commitType: string): Promise<string> {
27 const openai = new OpenAI();
28
29 const prompt = `You are writing release notes for a developer tool. Based on this commit message, write a concise one-liner.
51
52 try {
53 const completion = await openai.chat.completions.create({
54 messages: [{ role: "user", content: prompt }],
55 model: "gpt-4o-mini",
Change-Logs-Generator

Change-Logs-Generatorprocess-commits.tsx3 matches

@charmaine•Updated 1 week ago
5import { discordWebhook } from "https://esm.town/v/stevekrouse/discordWebhook";
6import { Octokit } from "npm:octokit";
7import { OpenAI } from "https://esm.town/v/std/openai";
8
9// Environment variables, set them in the left sidebar
25 */
26async function generateUserFocusedSummary(fullCommitMessage: string, commitType: string): Promise<string> {
27 const openai = new OpenAI();
28
29 const prompt = `You are writing release notes for a developer tool. Based on this commit message, write a concise one-liner.
51
52 try {
53 const completion = await openai.chat.completions.create({
54 messages: [{ role: "user", content: prompt }],
55 model: "gpt-4o-mini",

Townie-09system_prompt.txt4 matches

@jxnblk•Updated 1 week 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-09.cursorrules4 matches

@jxnblk•Updated 1 week 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-valREADME.md1 match

@charmaine•Updated 1 week 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

autonomous-valagent.tsx2 matches

@charmaine•Updated 1 week 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";
34 const maxSteps = 10;
35
36 const model = Deno.env.get("ANTHROPIC_API_KEY") ? anthropic("claude-3-7-sonnet-latest") : openai("gpt-4.1");
37
38 const options = {

markdown-embed.cursorrules4 matches

@stevekrouse•Updated 1 week 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" },

openai-clientmain.tsx9 matches

@cricks_unmixed4u•Updated 1 week ago
1import { OpenAI } from "https://esm.sh/openai@4.85.1";
2import { sqlite } from "https://esm.town/v/std/sqlite";
3
7};
8
9interface ChatOpenAI {
10 invoke(messages: Message[]): Promise<string>;
11}
12
13export function ChatOpenAI(model: string): ChatOpenAI {
14 const openai = new OpenAI();
15
16 return {
17 invoke: async (messages: Message[]): Promise<string> => {
18 const completion = await openai.chat.completions.create({
19 messages: messages.map(message => ({
20 role: message.role as "user" | "assistant" | "system",
29}
30
31// Decorator for ChatOpenAI that will eventually add rate limiting
32export function GlobalRateLimitedChatOpenAI(model: string, requestsPerSecond: number): ChatOpenAI {
33 const openAi = ChatOpenAI(model);
34
35 const rateLimiter = new GlobalRateLimiter(requestsPerSecond);
39 await rateLimiter.check();
40
41 return openAi.invoke(messages);
42 },
43 };

stevensDemo.cursorrules4 matches

@sysbot•Updated 1 week 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" },

thirdTimerval-town.mdc4 matches

@nbbaier•Updated 1 week ago
93Note: When changing a SQLite table's schema, change the table's name (e.g., add _2 or _3) to create a fresh table.
94
95### OpenAI
96
97```ts
98import { OpenAI } from "https://esm.town/v/std/openai";
99const openai = new OpenAI();
100const completion = await openai.chat.completions.create({
101 messages: [
102 { role: "user", content: "Say hello in a creative way" },

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