Search
Code44
{ step: 1, substrate: "Glucose", product: "Glucose-6-phosphate", enzyme: "Hexokinase", { step: 2, substrate: "Glucose-6-phosphate", product: "Fructose-6-phosphate", enzyme: "Phosphoglucose isomerase", { step: 3, substrate: "Fructose-6-phosphate", product: "Fructose-1,6-bisphosphate", enzyme: "Phosphofructokinase-1", { step: 4, substrate: "Fructose-1,6-bisphosphate", product: "Glyceraldehyde-3-phosphate", enzyme: "Aldolase", { step: 5, substrate: "Glyceraldehyde-3-phosphate", product: "1,3-Bisphosphoglycerate", enzyme: "G3P dehydrogenase", return glycolysis.filter( (step) => step.substrate.toLowerCase().includes(molecule.toLowerCase()) || step.product.toLowerCase().includes(molecule.toLowerCase()), ); (r) => ` <li> Step ${r.step}: ${r.substrate} → ${r.product}<br/> Enzyme: <strong>${r.enzyme}</strong> ${r.atpUsed ? `<br/>ATP Used: ${r.atpUsed}` : ""}
{ step: 1, substrate: "Glucose", product: "Glucose-6-phosphate", enzyme: "Hexokinase", { step: 2, substrate: "Glucose-6-phosphate", product: "Fructose-6-phosphate", enzyme: "Phosphoglucose isomerase", { step: 3, substrate: "Fructose-6-phosphate", product: "Fructose-1,6-bisphosphate", enzyme: "Phosphofructokinase-1", { step: 4, substrate: "Fructose-1,6-bisphosphate", product: "Glyceraldehyde-3-phosphate", enzyme: "Aldolase", { step: 5, substrate: "Glyceraldehyde-3-phosphate", product: "1,3-Bisphosphoglycerate", enzyme: "G3P dehydrogenase", return glycolysis.filter( (step) => step.substrate.toLowerCase().includes(molecule.toLowerCase()) || step.product.toLowerCase().includes(molecule.toLowerCase()), ); (r) => ` <li> Step ${r.step}: ${r.substrate} → ${r.product} <br/> Enzyme: <strong>${r.enzyme}</strong> ${r.atpUsed ? `<br/>ATP Used: ${r.atpUsed}` : ""}
{ step: 1, substrate: "Glucose", product: "Glucose-6-phosphate", enzyme: "Hexokinase", { step: 2, substrate: "Fructose-6-phosphate", product: "Fructose-1,6-bisphosphate", enzyme: "Phosphofructokinase-1", { step: 3, substrate: "Glyceraldehyde-3-phosphate", product: "1,3-Bisphosphoglycerate", enzyme: "Glyceraldehyde-3-phosphate dehydrogenase", return glycolysis.filter( (step) => step.substrate.toLowerCase().includes(molecule.toLowerCase()) || step.product.toLowerCase().includes(molecule.toLowerCase()), );
// import { ComputeJSON, sb, Substrate, TranscribeSpeech } from "npm:substrate";// import { extractValInfo } from "https://esm.town/v/pomdtr/extractValInfo?v=29";// async function processAudio(audio_uri) {// const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });// const opts = { cache_age: 60 * 60 * 24 * 7 };// opts,// );// const res = await substrate.run(transcribe, chapters, timestamps);// return {// transcript: res.get(transcribe),// <meta charset="UTF-8" />// <meta name="viewport" content="width=device-width, initial-scale=1.0" />// <link rel="icon" href="https://www.substrate.run/favicon.ico" type="image/x-icon">// <link// href="https://fonts.googleapis.com/css2?family=Roboto:wght@700&display=swap"// ${// !audio_uri// ? `<a id="federer-link" href="?url=https://media.substrate.run/federer-dartmouth.m4a">Or try an example: federer-dartmouth.m4a</a>`// : ""// }// ></div>// </div>// <a id="made-with" href="https://substrate.run" target="_blank"// >made with <b>substrate</b></a// >// <a id="view-source" href="${extractValInfo(import.meta.url).htmlUrl}" target="_blank"// }export default () => new Response("Substrate API not supported anymore");
> <img src="https://media.substrate.run/sval-layout-5.png" alt="Svalboard Keyboard Layout" style={{
import Exa from "npm:exa-js";import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";import { z } from "npm:zod";import { zodToJsonSchema } from "npm:zod-to-json-schema";// NOTE: We've disabled the Exa API key in this demo due to high volume – you'll need to fork and provide your own to run it.const exa = new Exa(Deno.env.get("EXA_API_KEY"));const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });const query = `"exa.ai" OR "@ExaAILabs"`;});markdown.id = "markdown";const stream = await substrate.stream(markdown);// Render streaming markdownexport default async function handler(req: Request): Promise<Response> { const renderMarkdown = (await import("https://esm.town/v/substrate/renderMarkdown")).default; return renderMarkdown(stream);}
NOTE: We've disabled the Exa API key in this demo due to high volume – you'll need to fork and provide your own to use it.Search on Twitter (powered by [Exa](https://exa.ai)) and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).To fork, [sign up for Substrate](https://substrate.run/) to get your own API key and $51 free credits. You'll also need Exa, which comes with generous free credits and can be a much cheaper alternative to the Twitter API.
Generate a story and summarize it using [Substrate](https://substrate.run/).🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $50 free credits.
import { ComputeText, sb, Substrate } from "npm:substrate";const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });const story = new ComputeText({ prompt: "tell me a story, be concise", max_tokens: 800 });});const stream = await substrate.stream(summary);export default async function render(req: Request): Promise<Response> { return new Response("User-agent: *\nDisallow: /"); } const renderNodeResults = (await import("https://esm.town/v/substrate/renderNodeResults")).default; return renderNodeResults(stream);}
Docs
No docs found