Brunobkr/llama.cpp_AlgMor24_github
ΩFFFΣLLIa • llama.cpp • AlgMor24 ██████╗ ███████╗███████╗███████╗██╗ ██╗ ██╗ █████╗ ██╔═══██╗██╔════╝██╔════╝██╔════╝██║ ██║ ██║██╔══██╗ ██║ ██║█████╗ █████╗ █████╗ ██║ ██║ ██║███████║ ██║ ██║██╔══╝ ██╔══╝ ██╔══╝ ██║ ██║ ██║██╔══██║ ╚██████╔╝██║ ██║ ███████╗███████╗███████╗██║██║ ██║ ╚═════╝ ╚═╝ ╚═╝ ╚══════╝╚══════╝╚══════╝╚═╝╚═╝ ╚═╝ High-Performance LLM / VLM Inference & Autonomous Agentic Ecosystem… See the full description on the dataset page: https://huggingface.co/datasets/Brunobkr/llama.cpp_AlgMor24_github.
03.1k
1/*2 Copyright 2019 Google LLC3 4 Use of this source code is governed by an MIT-style5 license that can be found in the LICENSE file or at6 https://opensource.org/licenses/MIT.7*/8 9import {canConstructResponseFromBodyStream} from './_private/canConstructResponseFromBodyStream.js';10import {WorkboxError} from './_private/WorkboxError.js';11 12import './_version.js';13 14/**15 * Allows developers to copy a response and modify its `headers`, `status`,16 * or `statusText` values (the values settable via a17 * [`ResponseInit`]{@link https://developer.mozilla.org/en-US/docs/Web/API/Response/Response#Syntax}18 * object in the constructor).19 * To modify these values, pass a function as the second argument. That20 * function will be invoked with a single object with the response properties21 * `{headers, status, statusText}`. The return value of this function will22 * be used as the `ResponseInit` for the new `Response`. To change the values23 * either modify the passed parameter(s) and return it, or return a totally24 * new object.25 *26 * This method is intentionally limited to same-origin responses, regardless of27 * whether CORS was used or not.28 *29 * @param {Response} response30 * @param {Function} modifier31 * @memberof workbox-core32 */33async function copyResponse(34 response: Response,35 modifier?: (responseInit: ResponseInit) => ResponseInit,36): Promise<Response> {37 let origin = null;38 // If response.url isn't set, assume it's cross-origin and keep origin null.39 if (response.url) {40 const responseURL = new URL(response.url);41 origin = responseURL.origin;42 }43 44 if (origin !== self.location.origin) {45 throw new WorkboxError('cross-origin-copy-response', {origin});46 }47 48 const clonedResponse = response.clone();49 50 // Create a fresh `ResponseInit` object by cloning the headers.51 const responseInit: ResponseInit = {52 headers: new Headers(clonedResponse.headers),53 status: clonedResponse.status,54 statusText: clonedResponse.statusText,55 };56 57 // Apply any user modifications.58 const modifiedResponseInit = modifier ? modifier(responseInit) : responseInit;59 60 // Create the new response from the body stream and `ResponseInit`61 // modifications. Note: not all browsers support the Response.body stream,62 // so fall back to reading the entire body into memory as a blob.63 const body = canConstructResponseFromBodyStream()64 ? clonedResponse.body65 : await clonedResponse.blob();66 67 return new Response(body, modifiedResponseInit);68}69 70export {copyResponse};71 