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/?q=function&page=2&format=json

For typeahead suggestions, use the /typeahead endpoint:

https://codesearch.val.run/typeahead?q=function

Returns an array of strings in format "username" or "username/projectName"

Found 30094 results for "function"(2056ms)

Email268 words

https://docs.val.town/vals/email/
team emails to Discord / Slack. Tip. Vals can send email, too! Using the email function in the standard library. Type Signature. Section titled “Type Signature” Files triggered by Email

Sections

Email

team emails to Discord / Slack. Tip. Vals can send email, too! Using the email function in the standard library.

Type Signature

Type Signature. Section titled “Type Signature” Files triggered by Email receive an argument called Email that represents the email that was sent. Here’s an example: Example export async function emailValHandler(email:

Send Discord message via webhook129 words

https://docs.val.town/integrations/discord/send-message/
body: JSON.stringify({ content }), }); if (text.length) throw Error("Discord Webhook error: " + text); }; You can browse example usages of this function here. Example Integration. Section titled “Example Integration”

Sections

Send Discord message via webhook

throw Error("Discord Webhook error: " + text); }; You can browse example usages of this function here.

Receiving a GitHub Webhook369 words

https://docs.val.town/integrations/github/receiving-a-github-webhook/
of your webhook. Securing GitHub Webhooks. Section titled “Securing GitHub Webhooks” Once public, your val function will listen for any payload sent to its endpoint. For security reasons, you probably

Sections

Securing GitHub Webhooks

GitHub Webhooks” Once public, your val function will listen for any payload sent to its endpoint. For security reasons, you probably want to limit requests to those coming from GitHub.

RSS153 words

https://docs.val.town/guides/rss/
"https://esm.town/v/std/email?v=9"; import { newRSSItems } from "https://esm.town/v/stevekrouse/newRSSItems"; import { rssFeeds } from "https://esm.town/v/stevekrouse/rssFeeds"; export async function pollRSSFeeds({ lastRunAt }: Interval) { return Promise.all( Object.entries(rssFeeds).map(async ([name, url]) => { let items

Sections

Polling RSS

"https://esm.town/v/std/email?v=9"; import { newRSSItems } from "https://esm.town/v/stevekrouse/newRSSItems"; import { rssFeeds } from "https://esm.town/v/stevekrouse/rssFeeds"; export async function pollRSSFeeds({ lastRunAt }: Interval) { return Promise.all( Object.entries(rssFeeds).map(async ([name, url]) => { let items

ORMs206 words

https://docs.val.town/std/sqlite/orms/
Prisma. Section titled “Prisma” 🚫 Prisma isn’t supported in Val Town because it relies on functionality that only exists in a classic server environment. Sequelize. Section titled “Sequelize” 🚫 Sequelize

Sections

Prisma

Prisma. Section titled “Prisma” 🚫 Prisma isn’t supported in Val Town because it relies on functionality that only exists in a classic server environment.

Importing674 words

https://docs.val.town/reference/import/
mind, and won’t work with Deno. While Deno implements most of the functionality of Node.js and some of the functionality of browsers - so many modules will “just work” in

Sections

Look for Deno compatibility

mind, and won’t work with Deno. While Deno implements most of the functionality of Node.js and some of the functionality of browsers - so many modules will “just work” in

Stripe741 words

https://docs.val.town/integrations/stripe/
@ts-ignore. import { Stripe } from "npm:stripe"; const stripe = new Stripe(Deno.env.get("STRIPE_TEST_API_KEY")); export default async function (req: Request): Promise<Response> { const url = new URL(req.url); if (url.pathname === "/") {

Sections

Stripe Checkout

@ts-ignore. import { Stripe } from "npm:stripe"; const stripe = new Stripe(Deno.env.get("STRIPE_TEST_API_KEY")); export default async function (req: Request): Promise<Response> { const url = new URL(req.url); if (url.pathname === "/") {

Example Val Town Stripe Webhook

from "npm:stripe"; const stripe = new Stripe( Deno.env.get("stripe_sk_customer_readonly") as string, { apiVersion: "2020-08-27", } ); function getStripeCustomer(customerId: string) { return stripe.customers.retrieve(customerId); } export let newStripeEvent = async (req: Request) =>

Permission errors345 words

https://docs.val.town/troubleshooting/permission-errors/
to your secrets (--allow-env). Some system information (--allow-sys=osRelease,homedir,cpus,hostname) This allows you to access the following functionality: import os from "node:os"; os.cpus(); os.homedir(); Deno.osRelease(); Deno.hostname(); These values are not particularly useful,

Sections

Allowed permissions

to your secrets (--allow-env). Some system information (--allow-sys=osRelease,homedir,cpus,hostname) This allows you to access the following functionality: import os from "node:os"; os.cpus(); os.homedir(); Deno.osRelease(); Deno.hostname(); These values are not particularly useful,

Upgrade Guide: Safer Val Scopes378 words

https://docs.val.town/troubleshooting/std-set-permission-error/
is deprecated and we now use blob storage with our std/blob library instead. The equivalent function to std.set() is blob.setJSON(). // Using std/set. import { set } from "https://esm.town/v/std/set"; set("createdAt",

Sections

Use Blob Storage Instead (recommended)

Use Blob Storage Instead (recommended). Section titled “Use Blob Storage Instead (recommended)” Std/set is deprecated and we now use blob storage with our std/blob library instead. The equivalent function to

Express410 words

https://docs.val.town/legacy-vals/express/
webhook handler to adhere to another service’s specifications (example val). The Val must be a function. It is passed two arguments, the Express req and res objects. You can use

Sections

Express

webhook handler to adhere to another service’s specifications (example val). The Val must be a function. It is passed two arguments, the Express req and res objects. You can use

create-val-sdk-demomain.tsx4 matches

@shouser•Updated 3 hours ago
20// newVal.id,
21// {
22// content: "export default async function (req: Request): Promise<Response> { return Response.json({ ok: true })}",
23// type: "http",
24// path: "dir/main.tsx",
26// );
27
28function extractEndFromUrl(url) {
29 try {
30 const urlObj = new URL(url);
36}
37
38// Main function to fetch all logs
39async function fetchAllLogs(vt, traces) {
40 const allLogs = [];
41 let currentEnd = new Date().toISOString();

Recruitmain.tsx31 matches

@svc•Updated 3 hours ago
97}
98
99function generateHtmlShell(initialQuery, sourceUrl) {
100 const escapedQuery = initialQuery.replace(/</g, "&lt;").replace(/>/g, "&gt;");
101 // NOTE: All user-facing text and branding has been updated from "NotaryAI/Notary" to "RecruitAI/Recruiting".
108<title>RecruitAI - AI Recruiting Assistant</title>
109<style>
110@keyframes fadeIn{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}:root{--sidebar-expanded-width:260px;--sidebar-collapsed-width:70px;--sidebar-transition-duration:0.3s}body{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;margin:0;background-color:#f4f7f9;color:#333a40;display:flex;min-height:100vh;font-size:16px;overflow-x:hidden}.app-container{display:flex;width:100%}.sidebar{width:var(--sidebar-expanded-width);background-color:#2d3748;color:#e2e8f0;height:100vh;position:fixed;left:0;top:0;box-shadow:3px 0 10px rgba(0,0,0,.1);display:flex;flex-direction:column;transition:width var(--sidebar-transition-duration) ease-in-out;z-index:100}.sidebar.collapsed{width:var(--sidebar-collapsed-width)}.sidebar.collapsed .sidebar-header h2,.sidebar.collapsed .sidebar-header .tagline,.sidebar.collapsed .nav-item .nav-item-text-main,.sidebar.collapsed .sidebar-footer .footer-text{display:none}.sidebar .nav-item svg{margin-right:12px;width:20px;height:20px;opacity:.8;flex-shrink:0}.sidebar.collapsed .nav-item svg{margin-right:0}.sidebar.collapsed .nav-item{justify-content:center;padding-left:0;padding-right:0}.sidebar-header{text-align:center;padding:0 20px;margin-bottom:25px}.sidebar-header h2{font-size:2em;color:#4299e1;font-weight:600;letter-spacing:.5px;margin:0}.sidebar-header .tagline{font-size:.8em;color:#a0aec0;margin-top:2px}.hamburger-container{display:flex;align-items:center;justify-content:flex-start;padding:10px 20px;height:40px}.sidebar.collapsed .hamburger-container{justify-content:center;padding:10px 0}.hamburger-menu{display:inline-block;cursor:pointer;background:0 0;border:none;padding:10px;position:relative;width:30px;height:22px;box-sizing:content-box}.hamburger-box{width:30px;height:22px;display:inline-block;position:relative}.hamburger-inner{display:block;top:50%;margin-top:-1px}.hamburger-inner,.hamburger-inner::after,.hamburger-inner::before{width:30px;height:2px;background-color:#e2e8f0;border-radius:4px;position:absolute;transition-property:transform;transition-duration:.15s;transition-timing-function:ease}.hamburger-inner::after,.hamburger-inner::before{content:"";display:block}.hamburger-inner::before{top:-8px}.hamburger-inner::after{bottom:-8px}.sidebar:not(.collapsed) .hamburger-menu .hamburger-inner{transform:rotate(180deg)}.sidebar:not(.collapsed) .hamburger-menu .hamburger-inner::before{transform:translateY(8px) rotate(45deg)}.sidebar:not(.collapsed) .hamburger-menu .hamburger-inner::after{transform:translateY(-8px) rotate(-45deg)}.nav-menu{list-style:none;padding:0;margin:0;flex-grow:1}.nav-item{display:flex;align-items:center;padding:14px 20px;margin-bottom:8px;cursor:pointer;transition:background-color .2s ease,color .2s ease;font-weight:500;white-space:nowrap;position:relative}.nav-item-text-main{transition:opacity .2s ease-in-out}.nav-item-text-hover{display:none}.sidebar.collapsed .nav-item .nav-item-text-main{opacity:0}.nav-item:hover{background-color:#4a5568;color:#fff}.nav-item.active{background-color:#4299e1;color:#fff;font-weight:600}.nav-item.active svg{opacity:1}.sidebar.collapsed .nav-item .nav-item-text-hover{position:absolute;left:calc(var(--sidebar-collapsed-width) - 10px);top:50%;transform:translateY(-50%) translateX(-15px) scale(.9);background-color:#4a5568;color:#fff;padding:10px 15px;border-radius:4px;font-size:.9em;white-space:nowrap;z-index:110;opacity:0;pointer-events:none;transition:opacity .2s ease,transform .2s ease;box-shadow:2px 2px 8px rgba(0,0,0,.2)}.sidebar.collapsed .nav-item:hover .nav-item-text-hover{opacity:1;transform:translateY(-50%) translateX(0) scale(1);pointer-events:auto}.sidebar-footer{font-size:.8em;color:#a0aec0;text-align:center;padding:15px 20px;border-top:1px solid #4a5568;white-space:nowrap}.sidebar-footer a{color:#7f9cf5;text-decoration:none}.sidebar-footer a:hover{text-decoration:underline}.main-content{margin-left:var(--sidebar-expanded-width);padding:30px 40px;flex-grow:1;overflow-y:auto;transition:margin-left var(--sidebar-transition-duration) ease-in-out;width:calc(100% - var(--sidebar-expanded-width))}.sidebar.collapsed+.main-content{margin-left:var(--sidebar-collapsed-width);width:calc(100% - var(--sidebar-collapsed-width))}.view{display:none;animation:fadeIn .4s ease-out}.view.active-view{display:block}.view>h1{font-size:2.2em;color:#2d3748;margin-bottom:25px;border-bottom:2px solid #e2e8f0;padding-bottom:15px}.card{background-color:#fff;border-radius:8px;padding:25px;margin-bottom:25px;box-shadow:0 4px 12px rgba(0,0,0,.07);border:1px solid #e2e8f0}.card h2,.card h3{color:#2d3748;margin-top:0;border-bottom:1px solid #edf2f7;padding-bottom:10px;margin-bottom:15px}button,.button{padding:10px 18px;border:none;border-radius:5px;font-size:1rem;font-weight:500;cursor:pointer;transition:background-color .2s ease,transform .1s ease;display:inline-flex;align-items:center;justify-content:center;gap:8px;text-decoration:none}.button-primary{background-color:#3182ce;color:#fff}.button-primary:hover{background-color:#2b6cb0;transform:translateY(-1px)}.button-primary:disabled{background-color:#a0aec0;cursor:not-allowed}.button-primary .spinner{display:none;width:16px;height:16px;border:2px solid hsla(0,0%,100%,.3);border-radius:50%;border-top-color:#fff;animation:spin .8s linear infinite}.button-primary.loading .spinner{display:inline-block}.button-primary.loading span{margin-right:8px}.button-secondary{background-color:#e2e8f0;color:#2d3748}.button-secondary:hover{background-color:#cbd5e0}.button-danger{background-color:#e53e3e;color:#fff}.button-danger:hover{background-color:#c53030}label{display:block;margin-bottom:8px;font-weight:600;color:#4a5568}input[type=file],input[type=text],textarea{width:calc(100% - 22px);padding:10px;margin-bottom:15px;border:1px solid #cbd5e0;border-radius:4px;font-size:1rem;box-sizing:border-box}input[type=file]{padding:8px;background-color:#f7fafc}textarea{min-height:100px;resize:vertical}#status-container{margin-top:20px;font-family:monospace;font-size:.9em;line-height:1.4;max-height:250px;overflow-y:auto;padding:10px;border:1px solid #e2e8f0;border-radius:4px;background-color:#f7fafc}.status-entry{margin-bottom:8px;padding:10px 15px;border-radius:4px;white-space:pre-wrap;word-wrap:break-word;animation:fadeIn .3s ease-out;font-size:.95em}.status-entry.info{background-color:#ebf8ff;color:#3182ce;border-left:4px solid #3182ce}.status-entry.error{background-color:#fff5f5;color:#c53030;border-left:4px solid #c53030;font-weight:700}.status-entry.progress{background-color:#f0fff4;color:#38a169;border-left:4px solid #38a169}#structured-results-container{margin-top:20px}.result-block{margin-bottom:20px;padding:20px;background-color:#f9fafb;border:1px solid #e2e8f0;border-radius:6px}.result-block h3{margin-top:0;color:#2d3748;font-size:1.25em;border-bottom:1px solid #e2e8f0;padding-bottom:8px;margin-bottom:12px}.result-block p{margin:6px 0;line-height:1.6}.result-block p strong{color:#2d3748;min-width:170px;display:inline-block}.result-block pre{background-color:#edf2f7;padding:12px;border-radius:4px;white-space:pre-wrap;word-wrap:break-word;font-size:.9em;max-height:280px;overflow-y:auto;border:1px solid #cbd5e0}.finding-card{border:1px solid #d1dce5;border-radius:6px;padding:18px;margin-bottom:18px;background-color:#fff;box-shadow:0 2px 6px rgba(0,0,0,.05)}.finding-card h4{margin-top:0;margin-bottom:10px;color:#2b6cb0;font-size:1.1em;display:flex;align-items:center;}.finding-card p{font-size:.95em;margin:5px 0}.finding-card p strong{color:#4a5568;min-width:140px}.severity-badge{display:inline-block;padding:3px 10px;border-radius:12px;font-size:0.85em;font-weight:600;color:#fff}.severity-badge.high{background-color:#c53030}.severity-badge.medium{background-color:#dd6b20}.severity-badge.low{background-color:#38a169}.severity-badge.unknown{background-color:#718096}.disclaimer{font-size:.8em;color:#718096;text-align:center;margin-top:12px;padding:8px;background-color:#edf2f7;border-radius:4px}.history-list{list-style:none;padding:0}.history-item{display:flex;flex-direction:column;padding:20px;margin-bottom:15px;border:1px solid #e2e8f0;border-radius:6px;background-color:#fff;box-shadow:0 2px 5px rgba(0,0,0,.05)}.history-item strong{font-size:1.1em;color:#2d3748;margin-bottom:5px;display:block}.history-item .meta{font-size:.9em;color:#718096;margin-bottom:12px}.history-item .actions{margin-top:15px;display:flex;gap:10px;flex-wrap:wrap}.suggestion-group{margin-bottom:15px}.suggestion-group-header{display:flex;align-items:center;margin-bottom:8px;background-color:#e9f0f7;padding:8px 12px;border-radius:4px;cursor:pointer}.suggestion-group-header input[type=checkbox]{margin-right:10px;height:17px;width:17px}.suggestion-group-header label{font-weight:600;font-size:1.05em;color:#2d3748;margin-bottom:0;flex-grow:1;cursor:pointer}.suggestion-group-tasks{padding-left:20px}#iq-suggested-tasks-list-container{margin-bottom:10px}#iq-task-selection-info{font-size:.9em;color:#718096;margin-bottom:15px}#iq-suggested-tasks-list{max-height:350px;overflow-y:auto;border:1px solid #cbd5e0;padding:10px;border-radius:4px;background-color:#fdfdfd}.suggestion-item-label{display:flex;align-items:center;width:100%;margin-bottom:6px;font-weight:400;padding:10px;border-radius:4px;cursor:pointer;transition:background-color .2s;border:1px solid transparent;background-color:#fff;box-shadow:0 1px 2px rgba(0,0,0,.05)}.suggestion-item-label:hover{background-color:#f0f4f8}.suggestion-item-label.high-priority-task{background-color:#e6fffa;border-left:3px solid #38a169}.suggestion-item-label input[type=checkbox]{margin-right:10px;vertical-align:middle;accent-color:#3182ce;height:16px;width:16px;flex-shrink:0}.suggestion-item-label .task-text{flex-grow:1}.iq-input-method{margin-bottom:20px;padding-bottom:15px;border-bottom:1px solid #edf2f7}.iq-input-method:last-child{border-bottom:none;margin-bottom:0;padding-bottom:0}.iq-input-method h3{font-size:1.1em;color:#4a5568;margin-bottom:10px}
111.magnifying-glass-loader{display:none;flex-direction:column;align-items:center;justify-content:center;padding:40px 20px;background-color:rgba(255,255,255,.8);border-radius:8px;margin-top:20px}.magnifying-glass-loader .glass{width:50px;height:50px;border:5px solid #3182ce;border-radius:50%;position:relative;animation:magnify-anim 1.5s infinite linear}.magnifying-glass-loader .handle{width:8px;height:25px;background:#3182ce;position:relative;top:-12px;left:25px;transform:rotate(45deg)}.magnifying-glass-loader p{margin-top:25px;font-size:1.1em;font-weight:500;color:#2d3748;letter-spacing:.5px}@keyframes magnify-anim{0%{transform:scale(1) rotate(0)}50%{transform:scale(1.2) rotate(180deg)}100%{transform:scale(1) rotate(360deg)}}
112.history-filter-controls{padding:20px;margin-bottom:20px;}.history-filter-form-grid{display:flex;gap:20px;align-items:flex-end;}.history-filter-types{display:flex;gap:15px;padding-bottom:10px;}.history-filter-types label{margin-bottom:0;font-weight:normal;cursor:pointer;}.history-filter-form-grid > div:first-child{flex-grow:1;}
139</div>
140<script>
141(function() {
142// Renamed storage keys and variables from notary to recruiting
143const DOCS_KEY = 'recruit_docs_v1', ANALYSES_KEY = 'recruit_analyses_v1', MAX_SUGGESTIONS = 15;
182});
183
184function navigateTo(viewId, params = {}) {
185 if(viewId !== 'new-candidate-review' || params.reset) {
186 currentRecruitingSession = getInitialRecruitingState();
207}
208
209function setupEventListeners() {
210 // FIX: Simplified hamburger click listener for all screen sizes
211 hamburgerToggle.addEventListener('click', () => {
268}
269
270function renderDashboard() {
271 const docs = getStore(DOCS_KEY);
272 const analyses = getStore(ANALYSES_KEY);
290
291// --- NEW CANDIDATE REVIEW WIZARD ---
292function renderNewReviewView(params = {}) {
293 views['new-candidate-review'].innerHTML = \`
294 <h1>New Candidate Review</h1>
317}
318
319function setWizardStep(step) {
320 currentRecruitingSession.step = step;
321
339}
340
341function renderStep1() {
342 const pane = document.getElementById('step-1-pane');
343 pane.innerHTML = \`
358}
359
360function renderStep2() {
361 const pane = document.getElementById('step-2-pane');
362 const { suggestions, suggestionsError, isProcessing } = currentRecruitingSession;
408}
409
410function renderStep3() {
411 const pane = document.getElementById('step-3-pane');
412 const { analysisResult, analysisError, isProcessing } = currentRecruitingSession;
443}
444
445async function handleDocInputAndSuggest() {
446 const fileInput = document.getElementById('iq-doc-file');
447 const loader = document.getElementById('iq-doc-processing-loader');
482}
483
484async function fetchAndPopulateSuggestions() {
485 currentRecruitingSession.isProcessing = true;
486 currentRecruitingSession.suggestionsError = null;
506}
507
508function populateSuggestedTasks(groups = {}) {
509 const iqTasksListDiv = document.getElementById('iq-suggested-tasks-list');
510 if(!iqTasksListDiv) return;
544}
545
546function handleGroupCheckboxChange(event) {
547 const iqTasksListDiv = document.getElementById('iq-suggested-tasks-list');
548 const groupCheckbox = event.target;
562}
563
564function handleSuggestionCheckboxChange() {
565 if (this.checked) {
566 const iqTasksListDiv = document.getElementById('iq-suggested-tasks-list');
576}
577
578function enforceMaxSelections() {
579 const iqTasksListDiv = document.getElementById('iq-suggested-tasks-list');
580 if(!iqTasksListDiv) return;
593}
594
595function updateAllGroupCheckboxesStates() {
596 const iqTasksListDiv = document.getElementById('iq-suggested-tasks-list');
597 if(!iqTasksListDiv) return;
615};
616
617async function handleFinalAnalysis(e) {
618 if(e) e.preventDefault();
619 const iqCustomTaskInput = document.getElementById('iq-custom-task-query');
688};
689
690function renderAnalysisResults(data) {
691 if (!data || typeof data !== 'object') return '<p>Invalid analysis results data.</p>';
692 let html = '';
709}
710
711function saveCurrentAnalysis() {
712 const { analysisResult, docId, analysisQuery } = currentRecruitingSession;
713 if (analysisResult && docId && analysisQuery) {
723}
724
725function renderHistoryView() {
726 views['history'].innerHTML = \`
727 <h1>History</h1>
801
802
803function deleteDocument(docId) {
804 let docs = getStore(DOCS_KEY);
805 let analyses = getStore(ANALYSES_KEY);
809}
810
811function deleteAnalysis(analysisId) {
812 let analyses = getStore(ANALYSES_KEY);
813 setStore(ANALYSES_KEY, analyses.filter(an => an.id !== analysisId));
815}
816
817function renderDocumentDetailView(docId) {
818 const doc = getStore(DOCS_KEY).find(d => d.id === docId);
819 const dv = views['document-detail'];
833}
834
835function renderAnalysisDetailView(analysisId) {
836 const an = getStore(ANALYSES_KEY).find(a => a.id === analysisId);
837 const dv = views['analysis-detail'];
842}
843
844function renderSettingsView() {
845 views.settings.innerHTML = \`<h1>Settings</h1><div class="card"><h3>Manage Local Data</h3><p>Candidate documents and analyses are stored in your browser's local storage. Your data does not leave your computer unless you explicitly send it for AI analysis.</p><p><strong>Warning: Clearing data is irreversible.</strong></p><button class="button button-danger" data-action="clear-local-storage">Clear All Local Data</button></div>\`;
846}
851}
852
853export default async function(req: Request) {
854 const { OpenAI } = await import("https://esm.town/v/std/openai");
855 const { PDFExtract } = await import("npm:pdf.js-extract");
870 const MAX_TEXT_ANALYZE = 30000;
871
872 async function extractPdfText(data: ArrayBuffer, fileName: string, log: LogEntry[]): Promise<string | null> {
873 log.push({ agent: "PDF", type: "step", message: `Processing: ${fileName}` });
874 try {
889 }
890
891 async function callAI(
892 systemPrompt: string,
893 userMessage: string,
919 }
920
921 async function ingestDocument(file: File, log: LogEntry[]): Promise<{ text: string | null; sourceDesc: string }> {
922 if (!file) {
923 log.push({ agent: "Ingest", type: "error", message: "No file provided." });
tuna

tuna9 file matches

@jxnblk•Updated 5 days ago
Simple functional CSS library for Val Town

getFileEmail4 file matches

@shouser•Updated 1 month ago
A helper function to build a file's email
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": "*",
webup
LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.