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/>
blob_adminREADME.md1 match
9[](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
1011It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
1213# TODO
2526export let spotifyRequestToken = ({ client_id, client_secret, code, redirect_uri }) =>
27fetchJSON("https://accounts.spotify.com/api/token", {
28method: "POST",
29body: querystring({
3940export let spotifyRefreshToken = async ({ refresh_token, client_id, client_secret }) =>
41fetch("https://accounts.spotify.com/api/token", {
42method: "POST",
43body: new URLSearchParams({
193194try {
195const currentlyPlaying = await fetch("https://api.spotify.com/v1/me/player/currently-playing", {
196method: "GET",
197headers: {
209210if (!mostRecentTrack) {
211const recentTracks = await fetch("https://api.spotify.com/v1/me/player/recently-played", {
212method: "GET",
213headers: {
234235try {
236const playStateResponse = await fetch("https://api.spotify.com/v1/me/player?market=US", {
237method: "GET",
238headers: {
huggingfacePipelinemain.tsx17 matches
1const HUGGING_FACE_API_URL = "https://api-inference.huggingface.co/models";
2const HUGGING_FACE_API_KEY = Deno.env.get("HUGGING_FACE_API_KEY");
34const defaultModels = {
6061async featureExtraction(input, options) {
62return this.callHuggingFaceAPI(input, options);
63}
6465async textClassification(input, options) {
66return this.callHuggingFaceAPI(input, options);
67}
6869async tokenClassification(input, options) {
70return this.callHuggingFaceAPI(input, options);
71}
7273async questionAnswering(input, options) {
74return this.callHuggingFaceAPI(input, options);
75}
7677async summarization(input, options) {
78return this.callHuggingFaceAPI(input, options);
79}
8081async translation(input, options) {
82return this.callHuggingFaceAPI(input, options);
83}
8485async textGeneration(input, options) {
86return this.callHuggingFaceAPI(input, options);
87}
8889async sentenceSimilarity(input, options) {
90return this.callHuggingFaceAPI(input, options);
91}
9293async callHuggingFaceAPI(payload, options) {
94try {
95const response = await fetch(`${HUGGING_FACE_API_URL}/${this.model}`, {
96method: "POST",
97headers: {
98"Authorization": `Bearer ${HUGGING_FACE_API_KEY}`,
99"Content-Type": "application/json"
100},
104if (!response.ok) {
105const error = await response.json();
106console.error("Hugging Face API Error:", error);
107return { error: `API request failed: ${error.error}` };
108}
109111return data;
112} catch (error) {
113console.error("Error calling Hugging Face API:", error);
114return { error: "Error calling Hugging Face API" };
115}
116}
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/>
1# OpenAI - [Docs ↗](https://docs.val.town/std/openai)
23Use OpenAI's chat completion API with [`std/openai`](https://www.val.town/v/std/openai). This integration enables access to OpenAI's language models without needing to acquire API keys.
45For free Val Town users, [all calls are sent to `gpt-3.5-turbo`](https://www.val.town/v/std/openaiproxy?v=5#L69).
34If these limits are too low, let us know! You can also get around the limitation by using your own keys:
35361. Create your own API key on [OpenAI's website](https://platform.openai.com/api-keys)
372. Create an [environment variable](https://www.val.town/settings/environment-variables?adding=true) named `OPENAI_API_KEY`
383. Use the `OpenAI` client from `npm:openai`:
39
blob_adminREADME.md1 match
9[](https://www.val.town/v/stevekrouse/blob_admin_app/fork)
1011It uses [basic authentication](https://www.val.town/v/pomdtr/basicAuth) with your [Val Town API Token](https://www.val.town/settings/api) as the password (leave the username field blank).
1213# TODO
readwiseHighlightsmain.tsx2 matches
11queryParams.append("pageCursor", nextPageCursor);
12}
13console.log("Making export api request with params " + queryParams.toString());
14const response = await fetch("https://readwise.io/api/v2/export/?" + queryParams.toString(), {
15method: "GET",
16headers: {
readwiseHighlightsREADME.md1 match
1https://readwise.io/api_deets
23Not sure how to convert from a reader ID (string) to a readwise ID (number)