Implement AWS Bedrock support (khanon/oai-reverse-proxy!45)

This commit is contained in:
khanon
2023-10-01 01:40:18 +00:00
parent 7e681a7bef
commit fa4bf468d2
38 changed files with 1438 additions and 410 deletions
+4 -1
View File
@@ -1,11 +1,13 @@
import type { HttpRequest } from "@smithy/types";
import { Express } from "express-serve-static-core";
import { APIFormat, Key } from "../shared/key-management/index";
import { APIFormat, Key, LLMService } from "../shared/key-management";
import { User } from "../shared/users/user-store";
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. */
@@ -24,6 +26,7 @@ declare global {
outputTokens?: number;
// TODO: remove later
debug: Record<string, any>;
signedRequest: HttpRequest;
}
}
}