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=47&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 2275 results for "openai"(4620ms)

Towniesystem_prompt.txt4 matches

@japhethkingjackson•Updated 4 weeks 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.cursorrules4 matches

@japhethkingjackson•Updated 4 weeks 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" },

mahiindex.ts6 matches

@Mahi7•Updated 4 weeks ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { readFile } from "https://esm.town/v/std/utils@85-main/index.ts";
3import { parseProject } from "https://esm.town/v/std/utils@85-main/index.ts";
4
5// Initialize OpenAI client
6const openai = new OpenAI();
7
8// Define response types
67 }
68
69 // Call OpenAI Vision API to analyze the image
70 const response = await openai.chat.completions.create({
71 model: "gpt-4o",
72 messages: [
93 console.error("Error analyzing image:", error);
94
95 // Determine if it's an OpenAI API error
96 const errorMessage = error instanceof Error
97 ? error.message

mahiREADME.md2 matches

@Mahi7•Updated 4 weeks ago
1# AI Image Recognition App
2
3This Val Town app uses OpenAI's Vision API to analyze images and provide descriptions of their content.
4
5## Features
23## Technologies Used
24
25- OpenAI Vision API
26- TailwindCSS for styling
27- Val Town's blob storage for caching (optional future enhancement)

Towniesystem_prompt.txt4 matches

@pachchigaryash•Updated 4 weeks 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.cursorrules4 matches

@pachchigaryash•Updated 4 weeks 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" },

Townie.cursorrules4 matches

@gueejla•Updated 4 weeks 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" },

scifi-bedtime-story-timestoryGenerator.ts4 matches

@dthyresson•Updated 4 weeks ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { StoryOptions, generateCuteCharacterName } from "../../shared/types.ts";
3
4const openai = new OpenAI();
5
6export async function generateStory(options: StoryOptions): Promise<{ title: string; content: string; characterName: string }> {
27 `;
28
29 // Generate the story using OpenAI
30 const completion = await openai.chat.completions.create({
31 messages: [
32 { role: "system", content: "You are a creative children's sci-fi storyteller who creates engaging, age-appropriate bedtime stories with robots, aliens, spaceships and other space themes." },

bedtime-story-timestoryGenerator.ts4 matches

@dthyresson•Updated 4 weeks ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2import { StoryOptions, generateCuteAnimalName } from "../../shared/types.ts";
3
4const openai = new OpenAI();
5
6export async function generateStory(options: StoryOptions): Promise<{ title: string; content: string; animalName: string }> {
27 `;
28
29 // Generate the story using OpenAI
30 const completion = await openai.chat.completions.create({
31 messages: [
32 { role: "system", content: "You are a creative children's storyteller who creates engaging, age-appropriate bedtime stories." },

Towniesystem_prompt.txt4 matches

@maxm•Updated 4 weeks 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" },

openai-client4 file matches

@cricks_unmixed4u•Updated 17 hours ago

openai_enrichment6 file matches

@stevekrouse•Updated 2 weeks 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