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=12&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 346 results for "openai"(495ms)

stevensDemo.cursorrules4 matches

@hashbrownUpdated 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

@tuckerwildeUpdated 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

@kahanUpdated 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

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

textToEmojimain.tsx8 matches

@dcm31Updated 1 week ago
52{
53 "emoji": "Single emoji summarizing the text",
54 "fullResponse": "JSON string containing the full OpenAI API response",
55 "fromCache": "Boolean indicating whether the response was retrieved from cache"
56}
59{
60 "emoji": "🍕",
61 "fullResponse": "{ ... full OpenAI API response ... }",
62 "fromCache": false
63}
64
65Note: The fullResponse field contains the complete OpenAI API response as a JSON string.
66You may want to parse this JSON string to access specific details of the API response.
67
110Caching:
111The API now uses SQLite to cache responses. If a request for the same text is made again,
112the cached emoji will be returned without calling the OpenAI API. This reduces API calls
113and improves response times for repeated queries.`}
114 </pre>
243
244export default async function server(request: Request): Promise<Response> {
245 const { OpenAI } = await import("https://esm.town/v/std/openai");
246 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
247 const openai = new OpenAI();
248
249 const url = new URL(request.url);
284 }
285
286 // If not in cache, call OpenAI API
287 const completion = await openai.chat.completions.create({
288 messages: [
289 { role: "system", content: "You are an emoji summarizer. Given a text, respond with exactly one emoji that best summarizes the content. Only respond with the single emoji, nothing else." },

myNewWebsite.cursorrules4 matches

@saatsazovUpdated 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

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

remark-frontmatter-starterchatgpt.md5 matches

@arfanUpdated 1 week ago
5 - subscription
6 - chatgpt
7 - openai
8 - billing
9---
13### Quick Links
14
15- [ChatGPT Website](https://chat.openai.com)
16- [Account Settings](https://chat.openai.com/settings)
17
18### Subscription Details
50### Support
51
52- [ChatGPT Help Center](https://help.openai.com)
53- [OpenAI Documentation](https://platform.openai.com/docs)
54

stevensDemo.cursorrules4 matches

@MKurdi21Updated 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

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

stevens-openai5 file matches

@yash_ingUpdated 2 days ago

openaiPricing9 file matches

@nbbaierUpdated 1 week ago
Project created from val URLs