Search

51 results found for substrate (2519ms)

Code
48

import urlHeader from "https://esm.town/v/substrate/urlHeader";
import Exa from "npm:exa-js";
import { ComputeText, GenerateImage, sb, Substrate } from "npm:substrate";
const exa = new Exa(Deno.env.get("EXA_API_KEY"));
const substrate = new Substrate({ apiKey: Deno.env.get("SUBSTRATE_API_KEY") });
export default async function handler(req: Request): Promise<Response> {
model: "Llama3Instruct70B",
});
const stream = await substrate.stream(summary);
let { readable, writable } = new TransformStream();
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
substrateBadge
 
Public
substrate
substrateBadgeMiddleware
 
Public

Docs

No docs found
4
Next