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=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 1737 results for "openai"(886ms)

Towniesystem_prompt.txt4 matches

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

CareerCoach20Dayinitialization.ts1 match

@prashamtrivedi•Updated 1 week ago
63 status: "pending",
64 priority: 1,
65 notes: "Highlight your experience with AWS Lambda, OpenAI, and TypeScript"
66 },
67 {

slackbolt.tsx7 matches

@dinavinter•Updated 1 week ago
47app.event("app_mention", async ({ event, say }) => {
48 try {
49 const { OpenAI } = await import("https://esm.town/v/std/openai");
50 const openai = new OpenAI();
51 const prompt = event.text.replace(/<@[A-Z0-9]+>/g, "").trim();
52
53 const completion = await openai.chat.completions.create({
54 messages: [
55 { role: "system", content: "You are a helpful assistant in a Slack channel." },
139 <html>
140 <head>
141 <title>Slack Bot with OpenAI</title>
142 <style>
143 body {
155 </head>
156 <body>
157 <h1>Slack Bot with OpenAI</h1>
158 <p>This is a Slack bot that uses OpenAI to generate responses. To use this bot:</p>
159 <ol>
160 <li>Add the bot to your Slack workspace</li>
161 <li>Mention the bot in a channel it's been invited to</li>
162 <li>The bot will use OpenAI to generate a response to your message</li>
163 </ol>
164 <p>For more information, check out the <a href="${
GitHub-Release-Notes

GitHub-Release-NotesREADME.md2 matches

@charmaine•Updated 1 week ago
6
7- `github.ts` - GitHub API integration for fetching commits and PR data
8- `llm.ts` - OpenAI integration for generating release notes
9- `types.ts` - Type definitions for the backend
10
50### POST /api/generate-notes
51
52Generates user-facing release notes from commit and PR data using OpenAI.
53
54**Request Body:**

CareerCoach20Dayanalysis.ts2 matches

@prashamtrivedi•Updated 1 week ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { selectAppropriateModel, processWithAI } from "./modelSelection.ts";
3import {
9} from "../database/queries.ts";
10
11const openai = new OpenAI();
12
13/**

CareerCoach20DayREADME.md1 match

@prashamtrivedi•Updated 1 week ago
32- ValTown serverless functions
33- SQLite database for persistent storage
34- OpenAI API for AI-powered analysis and recommendations
35- Email integration for notifications
36- Browser-based dashboard with interactive UI

gpt-image-testimage-generate.ts2 matches

@CaptainJack•Updated 1 week ago
1console.log(123);
2import openai from "openai";
3
4console.log("openai imported");

stevensDemo.cursorrules4 matches

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

stevensDemo.cursorrules4 matches

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

translateToEnglishWithOpenAImain.tsx4 matches

@shlmt•Updated 1 week ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3export default async function translateToEnglishWithOpenAI(text: string) {
4 const openai = new OpenAI();
5 const completion = await openai.chat.completions.create({
6 messages: [
7 {

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 1 week ago

testOpenAI1 file match

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