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=143&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 1568 results for "openai"(763ms)

fineTuningJob1main.tsx3 matches

@stevekrouse•Updated 1 year ago
1import { fineTuneExMispellings } from "https://esm.town/v/stevekrouse/fineTuneExMispellings";
2import process from "node:process";
3import { openaiFineTuneData } from "https://esm.town/v/stevekrouse/openaiFineTuneData";
4
5export let fineTuningJob1 = openaiFineTuneData({
6 key: process.env.openai,
7 data: fineTuneExMispellings,
8});

aleister_chatleymain.tsx3 matches

@scio•Updated 1 year ago
58 }
59 aleister_chatley_countdown = 8 + Math.floor(Math.random() * 6);
60 const { OpenAI } = await import("https://deno.land/x/openai/mod.ts");
61 const openAI = new OpenAI(process.env.OPENAI_KEY);
62 const chatCompletion = await openAI.createChatCompletion(
63 prompts.philip_k_dick,
64 );
2
3export const conversationalRetrievalQAChainStreamingExample = (async () => {
4 const { ChatOpenAI } = await import(
5 "https://esm.sh/langchain/chat_models/openai"
6 );
7 const { OpenAIEmbeddings } = await import(
8 "https://esm.sh/langchain/embeddings/openai"
9 );
10 const { BufferMemory } = await import("https://esm.sh/langchain/memory");
16 );
17 let streamedResponse = "";
18 const streamingModel = new ChatOpenAI({
19 openAIApiKey: process.env.OPENAI_API_KEY,
20 streaming: true,
21 callbacks: [{
25 }],
26 });
27 const nonStreamingModel = new ChatOpenAI({
28 openAIApiKey: process.env.OPENAI_API_KEY,
29 });
30 /* Create the vectorstore */
36 ],
37 [{ id: 2 }, { id: 1 }, { id: 3 }],
38 new OpenAIEmbeddings({
39 openAIApiKey: process.env.OPENAI_API_KEY,
40 }),
41 );

getJokemain.tsx1 match

@thu•Updated 1 year ago
1export const getJoke = (async () => {
2 const { ChatCompletion } = await import("npm:openai");
3 const result = await ChatCompletion.create({
4 model: "gpt-3.5-turbo",

modelSampleChatGeneratemain.tsx1 match

@webup•Updated 1 year ago
4 const builder = await getModelBuilder({
5 type: "chat",
6 provider: "openai",
7 });
8 const model = await builder();

memorySampleSummarymain.tsx1 match

@webup•Updated 1 year ago
4 const builder = await getMemoryBuilder({
5 type: "summary",
6 provider: "openai",
7 });
8 const memory = await builder();

braveAgentmain.tsx4 matches

@jacoblee93•Updated 1 year ago
3// Shows how to use the Brave Search tool in a LangChain agent
4export const braveAgent = (async () => {
5 const { ChatOpenAI } = await import(
6 "https://esm.sh/langchain/chat_models/openai"
7 );
8 const { BraveSearch } = await import("https://esm.sh/langchain/tools");
13 "https://esm.sh/langchain/agents"
14 );
15 const model = new ChatOpenAI({
16 temperature: 0,
17 openAIApiKey: process.env.OPENAI_API_KEY,
18 });
19 const tools = [

telegramDalleBotmain.tsx1 match

@hootz•Updated 1 year ago
28 const imageURL =
29 (await textToImageDalle(
30 process.env.openai,
31 text,
32 1,

memorySampleVectormain.tsx1 match

@webup•Updated 1 year ago
4 const builder = await getMemoryBuilder({
5 type: "vector",
6 provider: "openai",
7 });
8 const memory = await builder();

autoGPT_Testmain.tsx4 matches

@stevekrouse•Updated 1 year ago
4
5export let autoGPT_Test = (async () => {
6 const { Configuration, OpenAIApi } = await import("npm:openai@3.2.1");
7 const configuration = new Configuration({
8 apiKey: process.env.openai,
9 });
10 const openai = new OpenAIApi(configuration);
11 const completion = await openai.createChatCompletion({
12 model: "gpt-4",
13 messages: [

testOpenAI1 file match

@shouser•Updated 1 day ago

testOpenAI1 file match

@stevekrouse•Updated 1 day 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": "*",