Avatar

webup

LangChain (https://langchain.com) Ambassador, KubeSphere (https://kubesphere.io) Ambassador, CNCF OpenFunction (https://openfunction.dev) TOC Member.
Joined February 27, 2023
Likes
5
charmaine avatar
charmaine
townieIllustratorPrompt
Script
Add this to Townie's System prompt by going into Townie's Settings — First ask a user what app they would like you to illustrate. Then create an app outline generator for any app that is requested that produces a simplified, visual representation of the app's interface. Core Functionality - Accept an app name as input (e.g., "Zoom", "Slack", "Discord") - Generate a single val that renders a minimal, branded mockup of the app's main interface - Allow the user to export a png screenshot with transparent background with rounded corners (8px radius) - Move the `html2canvas` import inside the `client()` function. - Wrap the `exportAsPNG` function in a `useEffect` hook to ensure it's only defined on the client-side. - Use dynamic import for `html2canvas` inside the `exportAsPNG` function. - Make sure html2canvas is only loaded and used on the client-side Visual Requirements - Match the app's primary brand colors (limit to 2-3 colors) - Do light or dark mode of the app depending on which is the default for that app - Use placeholder blocks in light gray (#E5E5E5) for text and controls - Include key structural elements specific to the app (e.g., sidebars, headers, content areas), refrain from including text - Use SVG for any icons or logos, built into the component, if needed. - Apply consistent spacing (16px grid) - Ensure the generated outline is compact (around 280x220 pixels) for easy sharing and quick visualization.
1
stevekrouse avatar
stevekrouse
cerebras_coder
HTTP
This is an AI code assistant powered by Cerebras , running llama3.3-70b. Inspired by Hassan's Llama Coder . Setup Sign up for Cerebras Get a Cerebras API Key Save it in a Val Town environment variable called CEREBRAS_API_KEY
43
stevekrouse avatar
stevekrouse
safeCounter
Script
An interactive, runnable TypeScript val by stevekrouse
1
stevekrouse avatar
stevekrouse
dlock
Script
dlock - free distributed lock as a service https://dlock.univalent.net/ Usage API Acquire a lock. The id path segment is the lock ID - choose your own. https://dlock.univalent.net/lock/arbitrary-string/acquire?ttl=60 {"lease":1,"deadline":1655572186} Another attempt to acquire the same lock within its TTL will fail with HTTP status code 409. https://dlock.univalent.net/lock/01899dc0-2742-44f9-9c7b-01830851b299/acquire?ttl=60 {"error":"lock is acquired by another client","deadline":1655572186} The previous lock can be renewed with its lease number, like a heartbeat https://dlock.univalent.net/lock/01899dc0-2742-44f9-9c7b-01830851b299/acquire?ttl=60&lease=1 {"lease":1,"deadline":1655572824} Release a lock https://dlock.univalent.net/lock/01899dc0-2742-44f9-9c7b-01830851b299/release?lease=42
4
stevekrouse avatar
stevekrouse
langchainEx
Script
An interactive, runnable TypeScript val by stevekrouse
6
Next