Public
rozek
InvocationTracker_Test
HTTP
Here are some tests for val InvocationTracker Test Cases Constructor test with valid inputs tests creating a new InvocationTracker instance with valid name and granularity Constructor test with invalid name verifies that creating an InvocationTracker with an invalid name throws an error Constructor test existing table verifies that creating an InvocationTracker with an already existing table does not modify that table Granularity method test checks if the Granularity() method returns the correct initial granularity value setGranularity method test tests setting a new granularity value and verifies it's updated correctly increment method test verifies that the increment() method correctly increases the invocation count InvocationsInSpan method test tests retrieving invocations within a specific time span, including multiple time periods totalInvocationsInSpan method test checks if the total number of invocations within a given time span is calculated correctly reset method test verifies that the reset() method clears all recorded invocations
0
rozek
UUIDv4_Generator
HTTP
This is a simple generator for UUIDs of Type 4. While it may already be useful by itself, it has primarily been made in order to provide some data for the InvocationTracker and its viewer.
This means that every invocation of the UUIDv4 Generator is tracked - but only by incrementing an internal counter, no IP addresses or any other details are stored
0
rozek
OpenRouter_Test
HTTP
This is a simple test of OpenRouter and their new offering of DeepSeek-R1 671B for free The actual wrapper for the request is found in val OpenRouterChatCompletion with a simple smoke test in val OpenRouterChatCompletion_Test Please mind that the OpenRouter server often takes a long time to respond - and even then, it often does not respond with an actual chat completion but with an error message. Current overall usage limits for this instance of the app are: up to 20 requests/minute and up to 200 requests/day.
0
rozek
PBKDF2_Generator
HTTP
This is a simple generator for PBKDF2 password hashes. It can be used to manually generate these hashes and store it in a password file if no other mechanism for doing so is available. There is no specific required format for the password. For the number of iterations, values from 100000 up to 999999 are accepted - in these days, values of 600000 or higher are recommended. The final output has the format "{PBKDF2}<iterations>$<salt>$<hash>" where salt and hash are Base64-encoded. You may copy it directly or use salt and hash separately if you need a different format. The applet uses WebCrypto and runs entirely within the browser.
0
rozek
OpenAIChatCompletion
HTTP
Use Val.Town's Open AI access wherever you need to enter AI Provider Credentials Perhaps, you are going to build an AI application for the public with Val.Town. Personally, you may want to use the Open AI access that comes with Val.Town, but for the entirety of your users the rate limits of that access will be too low. Thus, you may want them to bring their own AI provider with their own server URL and access key. But, wait, how do you than use your own application, still using Val.Town's Open AI access? This is where this val comes in (assuming that you already have a Val.Town account, either a free or a paid one): fork this val use the fork's HTTP endpoint URL (in the form "https://XXX-openaichatcompletion.web.val.run") as AI server URL define an environment variable called "OpenAIChatCompletion" with any kind of content (but without any blanks or control characters, e.g., a UUID ) and use that as your personal access key Now, you can ask everybody to provide their AI credentials and still use the OpenAI access provided by Val.Town for your personal tests. Nota bene: if the environment variable "OpenAIChatCompletion" has not been defined, access to your fork's endpoint is free for everybody! In addition to the described authorization, this val also provides resource "throttling" (using val floatingQuotaTracker in sqlite tables "OpenAIChatCompletion_Info" and "OpenAIChatCompletion_Log") and calculates some access statistics (using val InvocationTracker in sqlite tables "OpenAIChatCompletion_Usage_Info" and "OpenAIChatCompletion_Usage_Log")
0
Updated: January 29, 2025