We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/chug2k/gemini-imagen4'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
files.js•1.01 KiB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
/**
* Consumes a stream and returns a concatenated array buffer. Useful in
* situations where we need to read the whole file because it forms part of a
* larger payload containing other fields, and we can't modify the underlying
* request structure.
*/
export async function readableStreamToArrayBuffer(readable) {
const reader = readable.getReader();
const chunks = [];
let totalLength = 0;
let done = false;
while (!done) {
const { value, done: doneReading } = await reader.read();
if (doneReading) {
done = true;
}
else {
chunks.push(value);
totalLength += value.length;
}
}
const concatenatedChunks = new Uint8Array(totalLength);
let offset = 0;
for (const chunk of chunks) {
concatenatedChunks.set(chunk, offset);
offset += chunk.length;
}
return concatenatedChunks.buffer;
}
//# sourceMappingURL=files.js.map