MCPcopy Create free account
hub / github.com/di-sukharev/opencommit / constructModelRequest

Function constructModelRequest

out/cli.cjs:78891–78897  ·  view source on GitHub ↗
(model, task, apiKey, stream4, body, requestOptions)

Source from the content-addressed store, hash-verified

78889 } else if (headerName === "x-goog-api-client") {
78890 throw new GoogleGenerativeAIRequestInputError(`Header name ${headerName} can only be set using the apiClient field`);
78891 }
78892 headers.append(headerName, headerValue);
78893 }
78894 }
78895 return headers;
78896}
78897async function constructModelRequest(model, task, apiKey, stream4, body, requestOptions) {
78898 const url2 = new RequestUrl(model, task, apiKey, stream4, requestOptions);
78899 return {
78900 url: url2.toString(),

Callers 1

makeModelRequestFunction · 0.85

Calls 3

buildFetchOptionsFunction · 0.85
getHeadersFunction · 0.85
toStringMethod · 0.45

Tested by

no test coverage detected