TowniecalculateCost.tsx1 match
5const CACHE_WRITE_RATE = 3.75; // $3.75 per M cache-write tokens
67export function calculateCost({
8input_tokens,
9output_tokens,
2* Get information about the webhook status
3*/
4async function getWebhookInfo() {
5try {
6const botToken = process.env.TELEGRAM_BOT_TOKEN;
1import { OpenAI } from "https://esm.town/v/std/openai";
23export default async function(req: Request): Promise<Response> {
4if (req.method === "OPTIONS") {
5return new Response(null, {
untitled-6223README.md1 match
1import { OpenAI } from "https://esm.town/v/std/openai";
23export default async function(req: Request): Promise<Response> {
4if (req.method === "OPTIONS") {
5return new Response(null, {
1import { OpenAI } from "https://esm.town/v/std/openai";
23export default async function(req: Request): Promise<Response> {
4if (req.method === "OPTIONS") {
5return new Response(null, {
testPondiversereport1 match
1import { email } from "https://esm.town/v/std/email";
23export default async function(req: Request): Promise<Response> {
4let body;
5try {
1export default async function(req: Request): Promise<Response> {
2return Response.json({
3image_url: "https://jon.bo/IMG_9387.png",
testPondiversegetCreations1 match
3import { TABLE_NAME } from "./updateTable";
45export default async function(req: Request): Promise<Response> {
6// First, get the row IDs of all rows that are older than 25 hours old
7const res = await sqlite.execute(`
blob_adminapp.tsx7 matches
10}
1112function Tooltip({ children, content }: TooltipProps) {
13const [isVisible, setIsVisible] = useState(false);
14const tooltipRef = useRef<HTMLDivElement>(null);
49}
5051function formatBytes(bytes: number, decimals = 2) {
52if (bytes === 0) return "0 Bytes";
53const k = 1024;
58}
5960function copyToClipboard(text: string) {
61navigator.clipboard.writeText(text).then(() => {
62console.log("Text copied to clipboard");
66}
6768function ActionMenu({ blob, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
69const [isOpen, setIsOpen] = useState(false);
70const menuRef = useRef(null);
7374useEffect(() => {
75function handleClickOutside(event) {
76if (menuRef.current && !menuRef.current.contains(event.target)) {
77event.stopPropagation();
155}
156157function BlobItem({ blob, onSelect, isSelected, onDownload, onRename, onDelete, onMoveToPublic, onMoveOutOfPublic }) {
158const [isLoading, setIsLoading] = useState(false);
159const decodedKey = decodeURIComponent(blob.key);
216}
217218function App({ initialEmail, initialProfile, sourceURL }) {
219const encodeKey = (key: string) => encodeURIComponent(key);
220const decodeKey = (key: string) => decodeURIComponent(key);
testPondiversegetCreation1 match
3import { TABLE_NAME } from "./updateTable";
45export default async function(req: Request): Promise<Response> {
6const url = new URL(req.url);
7const id = url.searchParams.get("id");