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/$2?q=openai&page=17&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 2240 results for "openai"(3294ms)

Towniesystem_prompt.txt4 matches

@apiry•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.cursorrules4 matches

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

untitled-4398main.tsx3 matches

@stevekrouse•Updated 1 week ago
1import OpenAI from 'npm:openai'
2
3const openai = new OpenAI()
4
5openai.sd

stevensDemo.cursorrules4 matches

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

untitled-1082chat.ts10 matches

@zee1205•Updated 1 week ago
1import { Hono } from "https://esm.sh/hono@3.11.7";
2import { streamText } from "https://esm.sh/hono@3.11.7/streaming";
3import { OpenAI } from "https://esm.town/v/std/openai";
4import {
5 searchMedicalContent,
95 : "No specific textbook content found for this query.";
96
97 // Prepare messages for OpenAI
98 const openaiMessages = [
99 { role: "system", content: SYSTEM_PROMPT },
100 { role: "user", content: `Context from Nelson Textbook:\n${contextText}\n\nUser Question: ${message}` }
105 recentMessages.forEach(msg => {
106 if (msg.role !== 'system') {
107 openaiMessages.push({
108 role: msg.role,
109 content: msg.content
116 return streamText(c, async (stream) => {
117 try {
118 const openai = new OpenAI();
119 const completion = await openai.chat.completions.create({
120 model: "gpt-4o-mini",
121 messages: openaiMessages,
122 stream: true,
123 max_tokens: 1500,
199 } else {
200 // Non-streaming response
201 const openai = new OpenAI();
202 const completion = await openai.chat.completions.create({
203 model: "gpt-4o-mini",
204 messages: openaiMessages,
205 max_tokens: 1500,
206 temperature: 0.3,

untitled-1082README.md3 matches

@zee1205•Updated 1 week ago
37- **Hono** API framework
38- **Supabase** with PGVector for vector search
39- **OpenAI/Mistral** for AI responses
40- **Hugging Face** for embeddings
41
68### Prerequisites
69- Supabase project with PGVector extension
70- OpenAI or Mistral API key
71- Hugging Face API key (optional for server-side embeddings)
72
75SUPABASE_URL=your_supabase_url
76SUPABASE_ANON_KEY=your_supabase_anon_key
77OPENAI_API_KEY=your_openai_key
78HUGGING_FACE_API_KEY=your_hf_key (optional)
79```

Towniesystem_prompt.txt4 matches

@Jocelyne4•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.cursorrules4 matches

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

Towniesystem_prompt.txt4 matches

@zeinab13•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.cursorrules4 matches

@zeinab13•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-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