A Cloudflare Worker which works in conjunction with https://github.com/indexxing/bsky-alt-text
1import type { Context } from "hono";
2import type { GoogleGenAI } from "@google/genai";
3
4export type AppContext = Context<{ Bindings: Env; Variables: Variables }>;
5
6export interface Env {
7 // Environmental Variables
8 MAX_ALT_TEXT_LENGTH: number;
9 ABSOLUTE_MAX_LENGTH: number;
10 MAX_DIRECT_BLOB_SIZE: number;
11
12 GEMINI_MODEL: string;
13 GEMINI_GENERATE_TEMPERATURE: number;
14 GEMINI_GENERATE_MAX_OUTPUT_TOKENS: number;
15 GEMINI_GENERATE_TOP_P: number;
16 GEMINI_GENERATE_TOP_K: number;
17
18 GEMINI_CONDENSE_TEMPERATURE: number;
19 GEMINI_CONDENSE_MAX_OUTPUT_TOKENS: number;
20
21 // Secrets
22 AUTH_TOKEN: string;
23 GEMINI_API_KEY: string;
24}
25
26export type Variables = {
27 gemini: GoogleGenAI;
28};