openclaw
Version:
Multi-channel AI gateway with extensible messaging integrations
14 lines (13 loc) • 536 B
TypeScript
type ResponseTextSnippetOptions = {
maxBytes?: number;
maxChars?: number;
};
type ResponseJsonOptions = {
maxBytes?: number;
errorPrefix: string;
};
/** Read a small collapsed text snippet from a response body. */
export declare function readResponseTextSnippet(res: Response, options?: ResponseTextSnippetOptions): Promise<string>;
/** Read and parse JSON while enforcing a hard byte limit. */
export declare function readResponseJsonWithLimit(res: Response, options: ResponseJsonOptions): Promise<unknown>;
export {};