feat(server): global embedding gql endpoint (#11809)
fix AI-30 fix AI-31 fix PD-2487
This commit is contained in:
11
packages/backend/server/src/plugins/copilot/utils.ts
Normal file
11
packages/backend/server/src/plugins/copilot/utils.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Readable } from 'node:stream';
|
||||
|
||||
import { readBufferWithLimit } from '../../base';
|
||||
import { MAX_EMBEDDABLE_SIZE } from './types';
|
||||
|
||||
export function readStream(
|
||||
readable: Readable,
|
||||
maxSize = MAX_EMBEDDABLE_SIZE
|
||||
): Promise<Buffer> {
|
||||
return readBufferWithLimit(readable, maxSize);
|
||||
}
|
||||
Reference in New Issue
Block a user