feat: distinguish model vendors and reuse playground keys
This commit is contained in:
1 parent
0a44a0802b
commit
281849ceb8
13 files changed
+222
-46
No files matched your search
+6
-1
@@ -63,7 +63,12 @@ public class GatewayController {
|
||||
@RequestHeader(value = "Idempotency-Key", required = false) String idempotencyKey,
|
||||
HttpServletResponse servletResponse
|
||||
) {
|
||||
Map<String, Object> key = requireKey(authorization);
|
||||
return executeChat(requireKey(authorization), input, idempotencyKey, servletResponse);
|
||||
}
|
||||
|
||||
// Both the public gateway and the authenticated playground share admission and billing.
|
||||
public ResponseEntity<Map<String, Object>> executeChat(Map<String, Object> key,
|
||||
Map<String, Object> input, String idempotencyKey, HttpServletResponse servletResponse) {
|
||||
long startedAt = System.currentTimeMillis();
|
||||
String modelId = String.valueOf(input.getOrDefault("model", ""));
|
||||
Map<String, Object> model = catalogService.activeModel(modelId);
|
||||
|
||||
Reference in new issue
Block a user