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/image-url.jpg%20%22Image%20title%22?q=openai&page=1&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 3227 results for "openai"(1343ms)

OpenAI352 words

https://docs.val.town/std/openai/
OpenAI. Copy page Copy page. Copy this page as Markdown for LLMs. View as Markdown View this page as plain text. Open in ChatGPT Ask questions about this page. Use

Sections

OpenAI

OpenAI. Copy page Copy page. Copy this page as Markdown for LLMs. View as Markdown View this page as plain text. Open in ChatGPT Ask questions about this page. Use

Basic Usage

Basic Usage. Section titled “Basic Usage” ExampleRun in Val Town ↗ import { OpenAI } from "https://esm.town/v/std/openai"; const openai = new OpenAI(); const completion = await openai.chat.completions.create({ messages: [ {

Limits

on OpenAI’s website. Create an environment variable named OPENAI_API_KEY. Use the OpenAI client from npm:openai: ExampleRun in Val Town ↗ import { OpenAI } from "npm:openai"; const openai = new

Web scraping439 words

https://docs.val.town/guides/web-scraping/
= $("p:nth-of-type(2)").first().text(); console.log(intro); Logs OpenAI is an American artificial intelligence (AI) research organization consisting of the non-profit OpenAI, Inc.[5] registered in Delaware and its for-profit subsidiary OpenAI Global, LLC.[6] One

Sections

Locate the HTML element that contains the data you need

element in the Chrome DevTools panel. For example, to scrape the introduction paragraph of the OpenAI page on Wikipedia, inspect the first word of the first paragraph. In the Elements

Parsing HTML

= $("p:nth-of-type(2)").first().text(); console.log(intro); Logs OpenAI is an American artificial intelligence (AI) research organization consisting of the non-profit OpenAI, Inc.[5] registered in Delaware and its for-profit subsidiary OpenAI Global, LLC.[6] One

Browserless434 words

https://docs.val.town/integrations/browserless/
await browser.close(); console.log(intro); Logs "OpenAI is an American artificial intelligence (AI) research laboratory consisting of the non-profit OpenAI Incorporated and its for-profit subsidiary corporation OpenAI Limited Partnership. OpenAI conducts AI

Sections

Make an API call to the /scrape API

API and form your request. For example, here’s how you scrape the introduction paragraph of OpenAI’s wikipedia page. Scrape API exampleRun in Val Town ↗ import { fetchJSON } from

Alternatively, use Puppeteer and a browser running on Browserless

await browser.close(); console.log(intro); Logs "OpenAI is an American artificial intelligence (AI) research laboratory consisting of the non-profit OpenAI Incorporated and its for-profit subsidiary corporation OpenAI Limited Partnership. OpenAI conducts AI

Val Town Docs232 words

https://docs.val.town/
AI. SQLite Store and retrieve structured data Blob Storage Store and retrieve any data OpenAI Use the OpenAI API Email Send emails API and SDK. Section titled “API and SDK”

Sections

Val Town Standard Library

AI. SQLite Store and retrieve structured data Blob Storage Store and retrieve any data OpenAI Use the OpenAI API Email Send emails

Email477 words

https://docs.val.town/std/email/
code. Receiving an attachment and then sending it along. Receiving an attachment, sending it to OpenAI, and then emailing it. Headers. Section titled “Headers” You can set custom headers in

Sections

Attachment examples

Attachment examples. Section titled “Attachment examples” Sending a PDF created in code. Receiving an attachment and then sending it along. Receiving an attachment, sending it to OpenAI, and then emailing

Your first scheduled cron599 words

https://docs.val.town/quickstarts/first-cron/
discordWebhookWeatherHyd - send weather updates to Discord. weather_forecast_in_the_morning - weather forecast on Telegram. weatherBot - OpenAI Weather Bot via function calling. aqi - email alerts when AQI is unhealthy near

Sections

Next steps

discordWebhookWeatherHyd - send weather updates to Discord. weather_forecast_in_the_morning - weather forecast on Telegram. weatherBot - OpenAI Weather Bot via function calling. aqi - email alerts when AQI is unhealthy near

Permissions935 words

https://docs.val.town/reference/permissions/
} from "https://esm.town/v/patrickjm/gpt3?v=4"; export let librarySecret = gpt3({ prompt: "what is the meaning of life?", openAiKey: Deno.env.get("openai"), }); Import security. If you’re importing someone else’s code, read the code first

Sections

Using another’s vals as a library

} from "https://esm.town/v/patrickjm/gpt3?v=4"; export let librarySecret = gpt3({ prompt: "what is the meaning of life?", openAiKey: Deno.env.get("openai"), }); Import security. If you’re importing someone else’s code, read the code first

Discord bot692 words

https://docs.val.town/integrations/discord/how-to-make-a-discord-bot-hosted-24-7-for-free-in-/
You’ll probably want to: Register a new Slash Command. Connect your bot to APIs like OpenAI’s GPT or Dall-E. Come join us in the Val Town Discord if you get

Sections

Further Directions

You’ll probably want to: Register a new Slash Command. Connect your bot to APIs like OpenAI’s GPT or Dall-E. Come join us in the Val Town Discord if you get

chatterchatterApp.js3 matches

@yawnxyz•Updated 4 hours ago
113 apiKeyInput: '',
114 // Model selection
115 selectedModel: 'openai/gpt-oss-120b',
116 // Browser search tool toggle
117 useBrowserSearch: true,
1432 model: this.selectedModel,
1433 reasoning_effort: this.reasoningEffort,
1434 tools: (() => { const list = []; const isOss = !!(this.selectedModel && this.selectedModel.startsWith('openai/gpt-oss')); if (isOss) { if (this.useBrowserSearch) list.push({ type: 'browser_search' }); if (this.useCodeInterpreter) list.push({ type: 'code_interpreter' }); } return list; })(),
1435 temperature: this.temperature,
1436 ...(this.maxTokens ? { max_tokens: this.maxTokens } : {}),
1577 model: this.selectedModel,
1578 reasoning_effort: this.reasoningEffort,
1579 tools: (() => { const list = []; const isOss = !!(this.selectedModel && this.selectedModel.startsWith('openai/gpt-oss')); if (isOss) { if (this.useBrowserSearch) list.push({ type: 'browser_search' }); if (this.useCodeInterpreter) list.push({ type: 'code_interpreter' }); } return list; })(),
1580 temperature: this.temperature,
1581 ...(this.maxTokens ? { max_tokens: this.maxTokens } : {}),

chatterchatControls.html4 matches

@yawnxyz•Updated 4 hours ago
97 <div class="relative">
98 <select x-model="selectedModel" @change="onModelChange()" class="px-2 py-1 pr-8 border border-gray-200 bg-white rounded-md focus:ring-2 focus:ring-blue-500 appearance-none text-xs w-full">
99 <option value="openai/gpt-oss-120b">openai/gpt-oss-120b</option>
100 <option value="openai/gpt-oss-20b">openai/gpt-oss-20b</option>
101 <option value="llama-3.1-8b-instant">llama-3.1-8b-instant</option>
102 <option value="llama-3.3-70b-versatile">llama-3.3-70b-versatile</option>
156 <span>JSON mode</span>
157 </label>
158 <label class="inline-flex items-center gap-2 text-xs" x-show="selectedModel && selectedModel.startsWith('openai/gpt-oss')">
159 <input type="checkbox" x-model="useBrowserSearch" @change="onUseBrowserSearchChange()" class="rounded border-gray-300">
160 <span>browser search</span>
161 </label>
162 <label class="inline-flex items-center gap-2 text-xs" x-show="selectedModel && selectedModel.startsWith('openai/gpt-oss')">
163 <input type="checkbox" x-model="useCodeInterpreter" @change="onUseCodeInterpreterChange()" class="rounded border-gray-300">
164 <span>code interpreter</span>

openai-usage1 file match

@nbbaier•Updated 17 hours ago

hello-realtime5 file matches

@jubertioai•Updated 3 days ago
Sample app for the OpenAI Realtime API
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
kwhinnery_openai