You can access search results via JSON API by adding format=json
to your query:
https://codesearch.val.run/image-url.jpg%20%22Image%20title%22?q=api&page=68&format=json
For typeahead suggestions, use the /typeahead
endpoint:
https://codesearch.val.run/typeahead?q=api
Returns an array of strings in format "username" or "username/projectName"
Found 19732 results for "api"(1598ms)
34const anthropic = new Anthropic({
5apiKey: Deno.env.get("ANTHROPIC_API_KEY"),
6});
7
13* - Bilingual support (English/Spanish) for UI elements.
14* - Built with 'npm:pdf.js-extract' for robust server-side PDF text extraction.
15* - Serves both the interactive HTML UI and the backend API endpoint from a single Val Town function.
16*
17* Configuration for the application (like agent definitions, UI text, and application settings)
18* is defined directly in the main function handler below.
19*
20* Assumes the 'openai' secret, containing your OpenAI API key, is set in your Val Town environment.
21*
22* Last Updated: 2024-05-22
113<title data-translate="pageTitle">${currentLocaleStrings.pageTitle}</title>
114<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
115<link rel="preconnect" href="https://fonts.googleapis.com">
116<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
117<link href="https://fonts.googleapis.com/css2?family=Cinzel:wght@600&family=Segoe+UI:wght@400;600&display=swap" rel="stylesheet">
118<style>
119:root {
827}
828829// --- Helper Function: Call OpenAI API ---
830async function callOpenAI(
831openai: OpenAI,
856}
857} catch (error) {
858console.error("OpenAI API Error:", error.message);
859return { role: "system", content: `AI Error: ${error.message}` };
860}