Spaces:
Paused
Paused
Download src/proxy/middleware/request/set-api-format.ts from cyclinghearttortoise/STE: direct link, hf CLI and curl.
- Browser
- Download file 342 Bytes
-
https://huggingface.co/spaces/cyclinghearttortoise/STE/resolve/main/src/proxy/middleware/request/set-api-format.ts
- Command line
-
hf download hf://spaces/cyclinghearttortoise/STE/src/proxy/middleware/request/set-api-format.ts
-
curl -L -o set-api-format.ts https://huggingface.co/spaces/cyclinghearttortoise/STE/resolve/main/src/proxy/middleware/request/set-api-format.ts
342 Bytes
| import { Request } from "express"; | |
| import { AIService } from "../../../key-management"; | |
| import { RequestPreprocessor } from "."; | |
| export const setApiFormat = (api: { | |
| inApi: Request["inboundApi"]; | |
| outApi: AIService; | |
| }): RequestPreprocessor => { | |
| return (req) => { | |
| req.inboundApi = api.inApi; | |
| req.outboundApi = api.outApi; | |
| }; | |
| }; | |