feat(server): global embedding gql endpoint (#11809)

fix AI-30
fix AI-31
fix PD-2487
This commit is contained in:
darkskygit
2025-04-23 11:25:40 +00:00
parent 5d9a3aac5b
commit 5397fba897
25 changed files with 665 additions and 60 deletions

View File

@@ -1,8 +1,3 @@
import { Readable } from 'node:stream';
import { readBufferWithLimit } from '../../../base';
import { MAX_EMBEDDABLE_SIZE } from './types';
export class GqlSignal implements AsyncDisposable {
readonly abortController = new AbortController();
@@ -14,10 +9,3 @@ export class GqlSignal implements AsyncDisposable {
this.abortController.abort();
}
}
export function readStream(
readable: Readable,
maxSize = MAX_EMBEDDABLE_SIZE
): Promise<Buffer> {
return readBufferWithLimit(readable, maxSize);
}