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/$%7BsvgDataUrl%7D?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 2237 results for "openai"(5232ms)

OpenAI310 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

Your first scheduled cron603 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

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

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

molarmessengermain.tsx3 matches

@Dentalabcs•Updated 42 mins ago
11 return new Response("Missing message or sender", { status: 400 });
12 }
13 // đź”— Generate response from OpenAI
14 const aiResponse = await (await fetch("https://api.openai.com/v1/chat/completions", {
15 method: "POST",
16 headers: {
17 "Authorization": `Bearer ${Deno.env.get("OPENAI_API_KEY")}`,
18 "Content-Type": "application/json",
19 },

honeydewmain.tsx5 matches

@legal•Updated 1 hour ago
1import { OpenAI } from "https://esm.town/v/std/openai";
2
3// --- TYPE DEFINITIONS ---
547
548export default async function(req: Request): Promise<Response> {
549 const openai = new OpenAI();
550 const url = new URL(req.url);
551 const CORS_HEADERS = {
566 case "synthesizeProject": {
567 const synthesisContent = `Current Date: ${new Date().toISOString().split("T")[0]}\n\nGoal: ${body.goal}`;
568 const completion = await openai.chat.completions.create({
569 model,
570 messages: [{ role: "system", content: PROJECT_SYNTHESIS_PROMPT }, {
582 JSON.stringify(body.tasks, null, 2)
583 }`;
584 const completion = await openai.chat.completions.create({
585 model,
586 messages: [{ role: "system", content: DAILY_REBALANCE_PROMPT }, {
611 }
612
613 const completion = await openai.chat.completions.create({
614 model,
615 messages: [systemMessage, ...conversation],

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