Search

Results include substring matches and semantically similar vals. Learn more
mharris717 avatar
VALLErun
@mharris717
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP (deprecated)
import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
import { anthropic } from "npm:@ai-sdk/anthropic";
import { openai } from "npm:@ai-sdk/openai";
import ValTown from "npm:@valtown/sdk";
import { StreamingTextResponse, streamText } from "npm:ai";
let vercelModel;
if (model.startsWith("gpt")) {
vercelModel = openai(model);
} else {
vercelModel = anthropic(model);
stevekrouse avatar
VALLErun
@stevekrouse
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP (deprecated)
import { verifyToken } from "https://esm.town/v/pomdtr/verifyToken";
import { anthropic } from "npm:@ai-sdk/anthropic";
import { openai } from "npm:@ai-sdk/openai";
import ValTown from "npm:@valtown/sdk";
import { StreamingTextResponse, streamText } from "npm:ai";
let vercelModel;
if (model.startsWith("gpt")) {
vercelModel = openai(model);
} else {
vercelModel = anthropic(model);
janpaul123 avatar
valle_tmp_56208884983514818093201845315532
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const contextWindow: any = await valleGetValsContextWindow(model);
const openai = new OpenAI();
const stream = await openai.chat.completions.create({
model,
cofsana avatar
townGen
@cofsana
townGen [[https://www.val.town/v/all/promptGen]] [[https://www.val.town/v/stevekrouse/valwriter]] Note : It looks like openai enhancement was dropped at some point when adding all the gizmos;
HTTP
- [[https://www.val.town/v/stevekrouse/valwriter]]
- _Note_: It looks like openai enhancement was dropped at some point when adding all the gizmos;
dthyresson avatar
bedtimeStoryMaker
@dthyresson
Bedtime Story Maker Inspired from a RedwoodJS demo I mde last year, this adds generative art powered by Fal to the bedtime story maker. Start writing a story by picking a style (spooky, colofrol, adventurous an animal (penguin, mouse, unicorn, whale ...) a color for the animal and activity (befriends aliens, goes to the doctor, rides a rollercoaster, bakes a cake for friends) It uses OpenAI to write a children's bedtime story title summary story for a "fantastical story about a green whale who rides the bus" or the "spooky story about the tomato fox who explores a cave". Then using the summary, OpenAI geenrates another prompt to describe the instructions to geneate a childrens story book image. That's sent to Fal to generate an image. Stories get saved to bedtime_stories in SQLite for viewing, searching and maybe sharing. You then get a bedtime story to enjoy!
HTTP (deprecated)
* and activity (befriends aliens, goes to the doctor, rides a rollercoaster, bakes a cake for friends)
It uses OpenAI to write a children's bedtime story
* title
for a "fantastical story about a green whale who rides the bus" or the "spooky story about the tomato fox who explores a cave
Then using the summary, OpenAI geenrates another prompt to describe the instructions to geneate a childrens story book image.
That's sent to Fal to generate an image.
import { ValTownLink } from "https://esm.town/v/dthyresson/viewOnValTownComponent";
import { chat } from "https://esm.town/v/stevekrouse/openai";
import * as fal from "npm:@fal-ai/serverless-client";
janpaul123 avatar
valle_tmp_62253074104033147819150473701293
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const contextWindow: any = await valleGetValsContextWindow(model);
const openai = new OpenAI();
const stream = await openai.chat.completions.create({
model,
pomdtr avatar
awesome
@pomdtr
Awesome Val Town An curated list of useful community vals. Feel free to create your own awesome list! Apps @pomdtr/blob_editor @nbbaier/sqliteExplorerApp View and interact with your Val Town SQLite data. @pomdtr/http_client Attach a postman-like http client to your vals VS Code Extension vt Chrome Extension Tooling Authentication @pomdtr/basicAuth @pomdtr/email_auth @pomdtr/password_auth Sqlite @sqlite/db @pomdtr/sql @pomdtr/kv @postpostscript/sqliteUniverse Blob @stevekrouse/blobAdmin @pomdtr/lowdb Middleware @andreterron/codeOnValTown Testing @pomdtr/test_explorer Api @pomdtr/api @pomdtr/trpc Other @vladimyr/valshot @pomdtr/mdx @pomdtr/serve_readme OpenAI @pomdtr/ask_ai Web Components Val Town Playground CodeMirror
HTTP (deprecated)
- @pomdtr/serve_readme
### OpenAI
- @pomdtr/ask_ai
roadlabs avatar
VALLErun
@roadlabs
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP (deprecated)
import { sleep } from "https://esm.town/v/stevekrouse/sleep?v=1";
import { anthropic } from "npm:@ai-sdk/anthropic";
import { openai } from "npm:@ai-sdk/openai";
import ValTown from "npm:@valtown/sdk";
import { StreamingTextResponse, streamText } from "npm:ai";
let vercelModel;
if (model.includes("gpt")) {
vercelModel = openai(model);
} else {
vercelModel = anthropic(model);
fab1an avatar
browserlessScrapeExample
@fab1an
An interactive, runnable TypeScript val by fab1an
Script
method: "POST",
body: JSON.stringify({
"url": "https://en.wikipedia.org/wiki/OpenAI",
"elements": [{
// The second <p> element on the page
stevekrouse avatar
valwriter_react_clientside
@stevekrouse
[ ] streaming we can't stream into an actual val - we can only write a full piece of text, i guess we can stream back the code so we don't get bored while we wait [ ] send the code of the valwriter back to gpt only if it's related, might need some threads [ ] send errors, logs back to gpt [ ] get screenshots of the output back to gpt [ ] experiment with applying diffs instead of regenerating from scratch every time could also have it as a conversation as the main thing and only the diffs get applied or the whole code gets replaced, maybe tool use it the key here... which does make it seem like a custom gpt may be the better fit...
HTTP (deprecated)
import { fetchText } from "https://esm.town/v/stevekrouse/fetchText";
import { chat } from "https://esm.town/v/stevekrouse/openai";
export default basicAuth(async (req) => {
await email({ subject: "Subject line", text: "Body of message" });
// OpenAI
import { OpenAI } from "https://esm.town/v/std/openai";
const openai = new OpenAI();
const completion = await openai.chat.completions.create({
messages: [
janpaul123 avatar
valle_tmp_60836902668989675457109372512279
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const contextWindow: any = await valleGetValsContextWindow(model);
const openai = new OpenAI();
const stream = await openai.chat.completions.create({
model,
janpaul123 avatar
valle_tmp_610457425865436710444833460520275
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const contextWindow: any = await valleGetValsContextWindow(model);
const openai = new OpenAI();
const stream = await openai.chat.completions.create({
model,
tmcw avatar
azureCheetah
@tmcw
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP (deprecated)
import { sleep } from "https://esm.town/v/stevekrouse/sleep?v=1";
import { anthropic } from "npm:@ai-sdk/anthropic";
import { openai } from "npm:@ai-sdk/openai";
import ValTown from "npm:@valtown/sdk";
import { StreamingTextResponse, streamText } from "npm:ai";
let vercelModel;
if (model.startsWith("gpt")) {
vercelModel = openai(model);
} else {
vercelModel = anthropic(model);
tmcw avatar
VALLErun
@tmcw
The actual code for VALL-E: https://www.val.town/v/janpaul123/VALLE
HTTP (deprecated)
import { sleep } from "https://esm.town/v/stevekrouse/sleep?v=1";
import { anthropic } from "npm:@ai-sdk/anthropic";
import { openai } from "npm:@ai-sdk/openai";
import ValTown from "npm:@valtown/sdk";
import { StreamingTextResponse, streamText } from "npm:ai";
let vercelModel;
if (model.startsWith("gpt")) {
vercelModel = openai(model);
} else {
vercelModel = anthropic(model);
janpaul123 avatar
valle_tmp_016298797667905655232930394407136
@janpaul123
@jsxImportSource https://esm.sh/react
HTTP (deprecated)
import _ from "npm:lodash@4";
import OpenAI from "npm:openai";
import { renderToString } from "npm:react-dom/server";
const contextWindow: any = await valleGetValsContextWindow(model);
const openai = new OpenAI();
const stream = await openai.chat.completions.create({
model,
…
25
…
Next