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/$1?q=openai&page=140&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 2159 results for "openai"(2764ms)

utmostGoldRoosterREADME.md1 match

@mrshorts•Updated 4 months ago
11
12### Toolings
13* Llms can uses [tools](https://platform.openai.com/docs/guides/function-calling), meaning you can make this an agent and a whole lot more useful.
14
15

utmostGoldRoostermain.tsx3 matches

@mrshorts•Updated 4 months ago
1import { zodResponseFormat } from "https://esm.sh/openai/helpers/zod";
2import { z } from "https://esm.sh/zod";
3import { email } from "https://esm.town/v/std/email";
4import { OpenAI } from "https://esm.town/v/std/openai";
5
6export default async function(e: Email) {
7 const client = new OpenAI();
8
9 const Messages = z.object({

photoEditingAIAppmain.tsx3 matches

@roysarajit143•Updated 4 months ago
144export default async function server(request: Request): Promise<Response> {
145 const { blob } = await import("https://esm.town/v/std/blob");
146 const { OpenAI } = await import("https://esm.town/v/std/openai");
147 const openai = new OpenAI();
148
149 if (request.method === 'POST') {
170 const { prompt } = await request.json();
171
172 const response = await openai.images.generate({
173 model: "dall-e-3",
174 prompt: prompt,

audioManagermain.tsx7 matches

@Foji•Updated 4 months ago
1
2import { OpenAI } from "https://esm.town/v/yawnxyz/OpenAI";
3import { fetch } from "https://esm.town/v/std/fetch";
4
44export class AudioManager {
45 constructor(apiKey=null, uploadFunction = null, downloadFunction = null) {
46 this.openai = new OpenAI(apiKey);
47 this.uploadFunction = uploadFunction || this.blobUpload;
48 }
68 };
69 const mergedOptions = { ...defaultOptions, ...options };
70 const transcription = await this.openai.audio.transcriptions.create(mergedOptions);
71 return transcription;
72 }
80 const mergedOptions = { ...defaultOptions, ...options };
81
82 const translation = await this.openai.audio.translations.create(mergedOptions);
83 return translation;
84 }
85
86 // returns an openai speech object
87 async textToSpeech(text, options = {}) {
88 const defaultOptions = {
92 };
93 const mergedOptions = { ...defaultOptions, ...options };
94 const speech = await this.openai.audio.speech.create(mergedOptions);
95 const arrayBuffer = await speech.arrayBuffer();
96 const blob = new Blob([arrayBuffer], { type: "audio/mpeg" });
106 };
107 const mergedOptions = { ...defaultOptions, ...options };
108 const speech = await this.openai.audio.speech.create(mergedOptions);
109 const arrayBuffer = await speech.arrayBuffer();
110 const blob = new Blob([arrayBuffer], { type: "audio/mpeg" });

emailSummaryHandlermain.tsx3 matches

@paulkinlan•Updated 4 months ago
2import { email } from "https://esm.town/v/std/email";
3import { extractValInfo } from "https://esm.town/v/stevekrouse/extractValInfo";
4import { OpenAI } from "npm:openai";
5
6function stripHtmlBackticks(html: string): string {
9
10export default async function(e: Email) {
11 const openai = new OpenAI();
12 console.log(`from: ${e.from} to: ${e.to} subject: ${e.subject}, cc: ${e.cc}, bcc: ${e.bcc}`);
13
25 }
26
27 const summary = await openai.chat.completions.create({
28 messages: [
29 {

highApricotImpalamain.tsx3 matches

@jdan•Updated 4 months ago
390export default async function server(request: Request): Promise<Response> {
391 const { sqlite } = await import("https://esm.town/v/stevekrouse/sqlite");
392 const { OpenAI } = await import("https://esm.town/v/std/openai");
393 const KEY = "highApricotImpala";
394 const SCHEMA_VERSION = 2;
501 );
502
503 const openai = new OpenAI();
504
505 const completion = await openai.chat.completions.create({
506 messages: [
507 {

emailSummaryHandlermain.tsx3 matches

@gitgrooves•Updated 5 months ago
1import { email } from "https://esm.town/v/std/email";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { extractValInfo } from "https://esm.town/v/stevekrouse/extractValInfo";
4
8
9export default async function(e: Email) {
10 const openai = new OpenAI();
11
12 const summary = await openai.chat.completions.create({
13 messages: [
14 {

emailSummaryHandlermain.tsx3 matches

@dazzag24•Updated 5 months ago
1import { email } from "https://esm.town/v/std/email";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { extractValInfo } from "https://esm.town/v/stevekrouse/extractValInfo";
4
9export default async function(e: Email) {
10 console.log(e.from, e.subject);
11 const openai = new OpenAI();
12
13 const summary = await openai.chat.completions.create({
14 messages: [
15 {

emailSummaryHandlermain.tsx3 matches

@stevekrouse•Updated 5 months ago
1import { email } from "https://esm.town/v/std/email";
2import { OpenAI } from "https://esm.town/v/std/openai";
3import { extractValInfo } from "https://esm.town/v/stevekrouse/extractValInfo";
4
9export default async function(e: Email) {
10 console.log(e.from, e.subject);
11 const openai = new OpenAI();
12
13 const summary = await openai.chat.completions.create({
14 messages: [
15 {

byobREADME.md1 match

@mrshorts•Updated 5 months ago
11
12### Toolings
13* Llms can uses [tools](https://platform.openai.com/docs/guides/function-calling), meaning you can make this an agent and a whole lot more useful.
14
15

openai-client1 file match

@cricks_unmixed4u•Updated 3 days ago

openai_enrichment6 file matches

@stevekrouse•Updated 5 days 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