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/$%7Bart_info.art.src%7D?q=openai&page=83&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 1623 results for "openai"(826ms)

cerebrasTemplateREADME.md2 matches

@rupesh0745•Updated 3 months ago
35Use Cerebras for AI on the backend like so:
36
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"

cerebrasTemplatemain.tsx2 matches

@rupesh0745•Updated 3 months ago
83 const { messages } = await request.json();
84
85 const { OpenAI } = await import("https://esm.sh/openai");
86 // Cerebras Inference
87 // Very important: do not change this
88 // Keep these comments so we remember not to change this
89 const client = new OpenAI({
90 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
91 baseURL: "https://api.cerebras.ai/v1",

cerebrasTemplateREADME.md2 matches

@devin78988•Updated 3 months ago
35Use Cerebras for AI on the backend like so:
36
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"

cerebrasTemplatemain.tsx2 matches

@devin78988•Updated 3 months ago
83 const { messages } = await request.json();
84
85 const { OpenAI } = await import("https://esm.sh/openai");
86 // Cerebras Inference
87 // Very important: do not change this
88 // Keep these comments so we remember not to change this
89 const client = new OpenAI({
90 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
91 baseURL: "https://api.cerebras.ai/v1",

flowingAmethystHippopotamusmain.tsx5 matches

@gokulnpc•Updated 3 months ago
2import { createRoot } from "https://esm.sh/react-dom@18.2.0/client?deps=react@18.2.0,react-dom@18.2.0";
3import React, { useCallback, useState } from "https://esm.sh/react@18.2.0";
4import { OpenAI } from "https://esm.town/v/std/openai";
5
6// Static import for syntax highlighting
78 setError(null);
79 try {
80 const openai = new OpenAI();
81
82 // Generate API Code
83 const codeCompletion = await openai.chat.completions.create({
84 model: "gpt-4o-mini",
85 messages: [
104
105 // Generate Tests
106 const testCompletion = await openai.chat.completions.create({
107 model: "gpt-4o-mini",
108 messages: [
125
126 // Generate Documentation
127 const docCompletion = await openai.chat.completions.create({
128 model: "gpt-4o-mini",
129 messages: [

prosperousYellowMulemain.tsx2 matches

@gokulnpc•Updated 3 months ago
190export default async function server(request: Request): Promise<Response> {
191 if (request.method === "POST" && new URL(request.url).pathname === "/generate-api") {
192 const { OpenAI } = await import("https://esm.sh/openai");
193
194 try {
212 }
213
214 const client = new OpenAI({
215 apiKey: apiKey,
216 baseURL: "https://api.cerebras.ai/v1"

prosperousYellowMuleREADME.md2 matches

@gokulnpc•Updated 3 months ago
35Use Cerebras for AI on the backend like so:
36
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"

cerebrasTemplateREADME.md2 matches

@siddz415•Updated 3 months ago
35Use Cerebras for AI on the backend like so:
36
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"

cerebrasTemplatemain.tsx2 matches

@siddz415•Updated 3 months ago
83 const { messages } = await request.json();
84
85 const { OpenAI } = await import("https://esm.sh/openai");
86 // Cerebras Inference
87 // Very important: do not change this
88 // Keep these comments so we remember not to change this
89 const client = new OpenAI({
90 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
91 baseURL: "https://api.cerebras.ai/v1",

AlwaysHere_migratedREADME.md2 matches

@varun1352•Updated 3 months ago
35Use Cerebras for AI on the backend like so:
36
37const { OpenAI } = await import("https://esm.sh/openai");
38const client = new OpenAI({
39 apiKey: Deno.env.get("CEREBRAS_API_KEY"),
40 baseURL: "https://api.cerebras.ai/v1"

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 4 days ago

testOpenAI1 file match

@stevekrouse•Updated 6 days ago
lost1991
import { OpenAI } from "https://esm.town/v/std/openai"; export default async function(req: Request): Promise<Response> { if (req.method === "OPTIONS") { return new Response(null, { headers: { "Access-Control-Allow-Origin": "*",