twitterAlertREADME.md3 matches
45This val gets Twitter data via [SocialData](https://socialdata.tools) via
6@stevekrouse/socialDataProxy. Val Town Pro users can call this API
7100 times per day, so be sure not to set this cron to run more than once every 15 min.
8If you want to use it more, get your own [SocialData](https://socialdata.tools)
9API token and pay for it directly.
1011## 1. Query
13Change the `query` variable for what you want to get notified for.
1415You can use [Twitter's search operators](https://developer.twitter.com/en/docs/twitter-api/v1/rules-and-filtering/search-operators) to customize your query, for some collection of keywords, filtering out others, and much more!
1617## 2. Notification
1A simple Rest API that allows for you GPT to save and recall snippets of data (memories). You can read my blog post explaining it in detail here: [xkonti.tech](https://xkonti.tech/blog/giving-gpt-memory/)
23# Demonstration
7
89What GPT sent do the API:
1011```json
24# Setup
2526There are several steps to set up the API:
27- deploy and configure the API
28- create the API key for your GPT
29- add an action for the API in you GPT
30- add prompt section to your GPT so that it can use it properly
3132## Deploying the API on Val Town
3334Deploy your own memory API. You can fork the following Val to do it: https://www.val.town/v/xkonti/memoryApiExample
3536In the code configure the appropriate values:
3738- `apiName` the name of your API - used in the Privacy Policy (eg. `Memory API`)
39- `contactEmail` - the email to provide for contact in the Privacy Policy (eg. `some@email.com`)
40- `lastPolicyUpdate` - the date the Privacy Policy was last updated (eg. `2023-11-28`)
41- `blobKeyPrefix` - the prefix for the blob storage keys used by your API - more info below (eg. `gpt:memories:`)
42- `apiKeyPrefix` - the prefix for you API Keys secrets - more info below (eg. `GPTMEMORYAPI_KEY_`)
4344## Create API keys
4546The Memory API is designed to serve multiple GPTs at the same time. Each GPT should have it's own unique **name** and **API key**.
4748The **name** is used for identifying the specific GPT and appended to both:
49- `blobKeyPrefix`- to maintain separate memory storage from other GPTs
50- `apiKeyPrefix` - to maintain separate API key for each GPT
51521. Please pick a unique alphanumeric name for your GPT. For example `personaltrainer`.
532. Generate some alphanumeric API key for your GPT. For example `Wrangle-Chapped-Monkhood4-Domain-Suspend`
543. Add a new secret to your Val.town secrets storage. The Key should be the picked name prefixed by `apiKeyPrefix`. Using the default it would be `GPTMEMORYAPI_KEY_personaltrainer`. The value of the secret should be the API key itself.
5556The memories of the GPT will be stored in the blob storage under the key `blobKeyPrefix + name`, for example: `gpt:memories:personaltrainer`.
59601. Add a new action in your GPT.
612. Get the OpenAPI spefication by calling the `/openapi` endpoint of your API
623. Change all `<APIURL>` instances within the specification to the url of your deployed API. For example `https://xkonti-memoryapiexample.web.val.run`
634. Set the authentication method to basic and provide a [base64 encoded](https://www.base64encode.org/) version of the `<name>:<apiKey>`. For example: `personaltrainer:Wrangle-Chapped-Monkhood4-Domain-Suspend` -> `cGVyc29uYWx0cmFpbmVyOldyYW5nbGUtQ2hhcHBlZC1Nb25raG9vZDQtRG9tYWluLVN1c3BlbmQ=`
645. Add the link to the privacy policy, which is the `/privacy` endpoint of your API. For example: `https://xkonti-memoryapiexample.web.val.run/privacy`
6566## Adding the prompt section
86```
8788Migrated from folder: APIs/gptmemory
891. Click `Fork`
102. Change `location` (Line 4) to describe your location. It accepts fairly flexible English descriptions which it turns into locations via [nominatim's geocoder API](https://www.val.town/v/stevekrouse/nominatimSearch).
113. Click `Run`
12
passwordGenmain.tsx11 matches
157const [policy, setPolicy] = useState({
158minLength: 12,
159requireCapital: true,
160requireSpecial: true,
161allowedSpecial: "!@#$%^&*()_+-=[]{}|;:,.<>?",
174...policy,
175minLength: 8,
176requireCapital: false,
177requireSpecial: false,
178});
182...policy,
183minLength: 12,
184requireCapital: true,
185requireSpecial: true,
186});
190...policy,
191minLength: 16,
192requireCapital: true,
193requireSpecial: true,
194});
292<input
293type="checkbox"
294id="requireCapital"
295checked={policy.requireCapital}
296onChange={(e) => setPolicy({ ...policy, requireCapital: e.target.checked })}
297className="w-5 h-5 text-green-600"
298/>
299<label htmlFor="requireCapital" className="text-lg">Require Capital Letter</label>
300</div>
301<div className="flex items-center space-x-2">
453<meta name="viewport" content="width=device-width, initial-scale=1.0">
454<title>Advanced Password Generation System</title>
455<link href="https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;700&display=swap" rel="stylesheet">
456<script src="https://cdn.tailwindcss.com"></script>
457<script>
586password = password.slice(0, insertIndex) + securePhrase + password.slice(insertIndex);
587588// Ensure capital letter if required
589if (policy.requireCapital && !/[A-Z]/.test(password)) {
590const index = Math.floor(Math.random() * password.length);
591password = password.slice(0, index) + password[index].toUpperCase() + password.slice(index + 1);
fullPageWebsiteScrapermain.tsx4 matches
78console.log("Debug - Full query being sent:", query);
7980console.log(`Making LSD API request for ${websiteUrl}`);
81const response = await fetch(
82`https://lsd.so/api?query=${encodeURIComponent(query)}`,
83);
84161a`;
162163console.log(`Making LSD API request for ${pageUrl}`);
164const response = await fetch(
165`https://lsd.so/api?query=${encodeURIComponent(pageQuery)}`,
166);
167
114<title>HTML to Markdown Converter (with Table and Link Support)</title>
115<meta name="viewport" content="width=device-width, initial-scale=1">
116<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;700&display=swap" rel="stylesheet">
117<style>${css}</style>
118</head>
sqliteExplorerAppREADME.md1 match
13## Authentication
1415Login to your SQLite Explorer with [password authentication](https://www.val.town/v/pomdtr/password_auth) with your [Val Town API Token](https://www.val.town/settings/api) as the password.
1617## Todos / Plans
sqliteExplorerAppmain.tsx2 matches
27<head>
28<title>SQLite Explorer</title>
29<link rel="preconnect" href="https://fonts.googleapis.com" />
3031<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
32<link
33href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300..700&family=Source+Sans+3:ital,wght@0,200..900;1,200..900&display=swap"
34rel="stylesheet"
35/>
xmasRedHamstermain.tsx2 matches
2728async function getMostPopularPinterestImage(query: string): Promise<string> {
29const searchUrl = `https://api.pinterest.com/v5/search/pins?query=${encodeURIComponent(query)}&page_size=50&sort_order=popularity`;
30const response = await fetch(searchUrl, {
31headers: {
3637if (!response.ok) {
38throw new Error(`Pinterest API request failed: ${response.statusText}`);
39}
40