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/image-url.jpg%20%22Optional%20title%22?q=openai&page=146&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 1594 results for "openai"(677ms)

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: [

langchainExmain.tsx4 matches

@jacoblee93•Updated 1 year ago
2
3export const langchainEx = (async () => {
4 const { ChatOpenAI } = await import(
5 "https://esm.sh/langchain/chat_models/openai"
6 );
7 const { PromptTemplate } = await import("https://esm.sh/langchain/prompts");
8 const { LLMChain } = await import("https://esm.sh/langchain/chains");
9 const model = new ChatOpenAI({
10 temperature: 0.9,
11 openAIApiKey: process.env.OPENAI_API_KEY,
12 verbose: true,
13 });

chatAgentWithCustomPromptmain.tsx4 matches

@jacoblee93•Updated 1 year ago
2
3export const chatAgentWithCustomPrompt = (async () => {
4 const { ChatOpenAI } = await import(
5 "https://esm.sh/langchain/chat_models/openai"
6 );
7 const { initializeAgentExecutorWithOptions } = await import(
11 "https://esm.sh/langchain/tools/calculator"
12 );
13 const model = new ChatOpenAI({
14 temperature: 0,
15 openAIApiKey: process.env.OPENAI_API_KEY,
16 });
17 const tools = [

createRelevantCommentmain.tsx2 matches

@thomasatflexos•Updated 1 year ago
1import { getOpenAiResponse } from "https://esm.town/v/thomasatflexos/getOpenAiResponse";
2import { getRelevantContent } from "https://esm.town/v/thomasatflexos/getRelevantContent";
3import process from "node:process";
57 \n IF you think that the Linkedin post is about new job opportunities, just respond with the text "N/A" and stop immediately. Do not respond any further.
58 \n ELSE IF you think the Linkdedin post is not about new job opportunities, please proceed to a meaningful comment to the provided Linkedin post based on the provided context and include ${link} in the post in a clever and relevant way, (don't be too blatant).`;
59 let finalResponse = await getOpenAiResponse(PROMPT);
60 const { data1, error1 } = await supabase
61 .from("linkedin_seedings")

generateEmbeddingsmain.tsx3 matches

@thomasatflexos•Updated 1 year ago
13 });
14 }
15 const { OpenAIEmbeddings } = await import("npm:langchain/embeddings");
16 const { createClient } = await import(
17 "https://esm.sh/@supabase/supabase-js@2"
39 const vectorStore = await SupabaseVectorStore.fromDocuments(
40 splittedDocs,
41 new OpenAIEmbeddings({
42 openAIApiKey: process.env.OPEN_API_KEY,
43 }),
44 {

chatGPTPluginmain.tsx2 matches

@stevekrouse•Updated 1 year ago
1import { fetchJSON } from "https://esm.town/v/stevekrouse/fetchJSON";
2import { openaiOpenAPI } from "https://esm.town/v/stevekrouse/openaiOpenAPI";
3
4// https://stevekrouse-chatgptplugin.express.val.run/.well-known/ai-plugin.json
38 // OpenAPI Spec
39 // only POST /v1/eval for now
40 res.send(openaiOpenAPI);
41 }
42 else if (req.path === "/v1/eval") {

translateToEnglishWithOpenAI1 file match

@shlmt•Updated 16 hours ago

testOpenAI1 file match

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