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/$%7Bsuccess?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 1576 results for "openai"(1165ms)

questionsWithGuidelinesChainmain.tsx6 matches

@jacoblee93•Updated 1 year ago
2
3export const questionsWithGuidelinesChain = (async () => {
4 const { ChatOpenAI } = await import(
5 "https://esm.sh/langchain@0.0.150/chat_models/openai"
6 );
7 const { LLMChain } = await import("https://esm.sh/langchain@0.0.150/chains");
19 ]);
20 const questionChain = questionPrompt
21 .pipe(new ChatOpenAI({
22 openAIApiKey: process.env.OPENAI_API_KEY,
23 })
24 .pipe(new StringOutputParser()));
31 const styleChain = stylePrompt
32 .pipe(
33 new ChatOpenAI({
34 openAIApiKey: process.env.OPENAI_API_KEY,
35 }),
36 )

askLeximain.tsx6 matches

@thomasatflexos•Updated 1 year ago
15 );
16 const { SupabaseVectorStore } = await import("npm:langchain/vectorstores");
17 const { ChatOpenAI } = await import("npm:langchain/chat_models");
18 const { OpenAIEmbeddings } = await import("npm:langchain/embeddings");
19 const { createClient } = await import(
20 "https://esm.sh/@supabase/supabase-js@2"
25 );
26 let streamedResponse = "";
27 const chat = new ChatOpenAI({
28 modelName: "gpt-3.5-turbo",
29 openAIApiKey: process.env.OPEN_API_KEY,
30 streaming: true,
31 callbacks: [{
35 });
36 const vectorStore = await SupabaseVectorStore.fromExistingIndex(
37 new OpenAIEmbeddings({
38 openAIApiKey: process.env.OPEN_API_KEY,
39 }),
40 {

generateValCodeAPImain.tsx1 match

@andreterron•Updated 1 year ago
4export let generateValCodeAPI = (description: string) =>
5 generateValCode(
6 process.env.VT_OPENAI_KEY,
7 description,
8 );

big_stories_ranksmain.tsx3 matches

@tmcw•Updated 1 year ago
61 "ranks": [[1689676050115, 8], [1689679650435, 9], [1689683250422, 9], [1689686850141, 9], [1689690449649, 9], [1689694050066, 10]]
62 },
63 "https://www.nytimes.com/2023/07/18/technology/openai-chatgpt-facial-recognition.html": {
64 "title": "OpenAI Worries About What Its Chatbot Will Say About People’s Faces",
65 "url": "https://www.nytimes.com/2023/07/18/technology/openai-chatgpt-facial-recognition.html",
66 "section": "technology",
67 "ranks": [[1689676050115, 9], [1689679650435, 10], [1689683250422, 10], [1689686850141, 10], [1689690449649, 10], [1689694050066, 11]]

unserializeableLogExmain.tsx4 matches

@stevekrouse•Updated 1 year ago
2
3export let unserializeableLogEx = (async () => {
4 const { Configuration, OpenAIApi } = await import("npm:openai");
5 const configuration = new Configuration({
6 apiKey: process.env.openai,
7 });
8 const openai = new OpenAIApi(configuration);
9 console.log(openai);
10})();

unserializeableLogExmain.tsx4 matches

@stevekrouse•Updated 1 year ago
2
3export let unserializeableLogEx = (async () => {
4 const { Configuration, OpenAIApi } = await import("npm:openai");
5 const configuration = new Configuration({
6 apiKey: process.env.openai,
7 });
8 const openai = new OpenAIApi(configuration);
9 console.log(openai);
10})();

kindnessmain.tsx1 match

@nate•Updated 1 year ago
4export let kindness = async () => {
5 return await gpt3({
6 openAiKey: process.env.OPENAI_API_KEY,
7 prompt:
8 "Speaking as universal consciousness, say something short, true, uplifting, loving, and kind.",

generateValCodemain.tsx3 matches

@andreterron•Updated 1 year ago
1import { openaiChatCompletion } from "https://esm.town/v/andreterron/openaiChatCompletion";
2
3export const generateValCode = async (
16 \`\`\`
17 `;
18 const response = await openaiChatCompletion({
19 openaiKey: key,
20 organization: org,
21 body: {

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 );

testOpenAI1 file match

@stevekrouse•Updated 6 hours ago

testOpenAI1 file match

@shouser•Updated 2 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": "*",