Search

50 results found for substrate (2164ms)

Code
47

Find similar pages on HN and return a streaming markdown summary.
Powered by [Exa](https://exa.ai/) and [Substrate](https://substrate.run).
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $5
nt and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $5
import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch";
import inputHeader from "https://esm.town/v/substrate/inputHeader";
import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";
import { z } from "npm:zod";
import { zodToJsonSchema } from "npm:zod-to-json-schema";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
// search for HN comments using https://hn.algolia.com/api
model: "Llama3Instruct70B",
});
const stream = await substrate.stream(markdown);
// Render streaming markdown
import { hnSearch } from "https://esm.town/v/stevekrouse/hnSearch";
import inputHeader from "https://esm.town/v/substrate/inputHeader";
import { ComputeJSON, ComputeText, sb, Substrate } from "npm:substrate";
import { z } from "npm:zod";
import { zodToJsonSchema } from "npm:zod-to-json-schema";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
// search for HN comments using https://hn.algolia.com/api
model: "Llama3Instruct70B",
});
const stream = await substrate.stream(markdown);
// Render streaming markdown
nt and return a streaming markdown summary (powered by [Substrate](https://substrate.run)).
The RAG portion of this is 34 lines of Substrate code. Twitter thread walkthrough: https://x.com
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $5
[WebSim](https://x.com/websim_ai) on Val with Substrate
🪩 To fork, [sign up for Substrate](https://substrate.run/signin) to get your own API key and $5
import urlHeader from "https://esm.town/v/substrate/urlHeader";
import { ComputeText, GenerateImage, sb, Substrate, UpscaleImage } from "npm:substrate";
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
export default async function render(req: Request): Promise<Response> {
});
image.cache_age = 60 * 60 * 24;
const res = await substrate.run(image);
const imageUri = res.get(image).image_uri;
const base64Data = imageUri.split(",")[1];
model: "Llama3Instruct70B",
});
const stream = await substrate.stream(html);
let { readable, writable } = new TransformStream();
import promptHeader from "https://esm.town/v/substrate/promptHeader";
import wrapper from "https://esm.town/v/substrate/substrateBadgeMiddleware";
import { ComputeJSON, ComputeText, GenerateImage, sb, Substrate } from "npm:substrate";
async function handler(req: Request): Promise<Response> {
const { prompt = "modernism" } = Object.fromEntries(searchParams);
// Substrate graph
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
const startup_name = new ComputeText({
});
const stream = await substrate.stream(haiku);
async function* content() {
Starter template for Substrate demos
// substrate + valtown badge
const left = 80;
const width = 160;
<svg xmlns="http://www.w3.org/2000/svg" width="${width}" height="${height}" viewBox="0 0 ${width
<rect width="${width}" height="${height}" fill="#111" rx="${radius}" ry="${radius}" />
<a href="https://substrate.run">
<text x="8" y="17" textAnchor="start" fill="#fff" style="font-family:system-ui,sans-serif;fo
Substrate
</text>
<text x="64" y="17" textAnchor="start" fill="#fff" style="font-family:system-ui,sans-serif;f
substrate
substrateBadge
 
Public
substrate
substrateBadgeMiddleware
 
Public

Docs

No docs found
4
Next