MCPcopy Create free account
hub / github.com/EvoMap/evolver / call

Function call

test/proxyOllamaE2E.test.js:53–62  ·  view source on GitHub ↗
({ reqPath, body })

Source from the content-addressed store, hash-verified

51 srv.actualPort = port;
52
53 const call = ({ reqPath, body }) => new Promise((resolve, reject) => {
54 const req = http.request({ host: '127.0.0.1', port, path: reqPath, method: 'POST',
55 headers: { 'content-type': 'application/json', authorization: 'Bearer aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'user-agent': 'ollama/0.5.1' } }, (res) => {
56 const chunks = [];
57 res.on('data', (d) => chunks.push(d));
58 res.on('end', () => resolve({ status: res.statusCode, bytes: Buffer.concat(chunks) }));
59 });
60 req.on('error', reject);
61 req.end(JSON.stringify(body));
62 });
63
64 const readRows = async (expected = 1) => {
65 let lines = [];

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected