Download src/shared/custom.d.ts from aukaru/344: direct link, hf CLI and curl.
- Browser
- Download file 1.52 kB
-
https://huggingface.co/spaces/aukaru/344/resolve/main/src/shared/custom.d.ts
- Command line
-
hf download hf://spaces/aukaru/344/src/shared/custom.d.ts
-
curl -L -o custom.d.ts https://huggingface.co/spaces/aukaru/344/resolve/main/src/shared/custom.d.ts
1.52 kB
| // noinspection JSUnusedGlobalSymbols,ES6UnusedImports | |
| import type { HttpRequest } from "@smithy/types"; | |
| import { Express } from "express-serve-static-core"; | |
| import { APIFormat, Key } from "./key-management"; | |
| import { User } from "./users/schema"; | |
| import { LLMService, ModelFamily } from "./models"; | |
| import { ProxyReqManager } from "../proxy/middleware/request/proxy-req-manager"; | |
| declare global { | |
| namespace Express { | |
| interface Request { | |
| key?: Key; | |
| service?: LLMService; | |
| /** Denotes the format of the user's submitted request. */ | |
| inboundApi: APIFormat; | |
| /** Denotes the format of the request being proxied to the API. */ | |
| outboundApi: APIFormat; | |
| /** If the request comes from a RisuAI.xyz user, this is their token. */ | |
| risuToken?: string; | |
| user?: User; | |
| isStreaming?: boolean; | |
| startTime: number; | |
| retryCount: number; | |
| queueOutTime?: number; | |
| onAborted?: () => void; | |
| proceed: () => void; | |
| changeManager?: ProxyReqManager; | |
| heartbeatInterval?: NodeJS.Timeout; | |
| monitorInterval?: NodeJS.Timeout; | |
| promptTokens?: number; | |
| outputTokens?: number; | |
| tokenizerInfo: Record<string, any>; | |
| signedRequest: HttpRequest; | |
| modelFamily?: ModelFamily; | |
| isChunkedTransfer?: boolean; | |
| } | |
| } | |
| } | |
| declare module "express-session" { | |
| interface SessionData { | |
| adminToken?: string; | |
| userToken?: string; | |
| csrf?: string; | |
| flash?: { type: string; message: string }; | |
| unlocked?: boolean; | |
| } | |
| } | |