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 2018 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 {assert} from 'workbox-core/_private/assert.js';10import {logger} from 'workbox-core/_private/logger.js';11import {12 RouteHandler,13 RouteMatchCallback,14 RouteMatchCallbackOptions,15} from 'workbox-core/types.js';16 17import {HTTPMethod} from './utils/constants.js';18import {Route} from './Route.js';19 20import './_version.js';21 22/**23 * RegExpRoute makes it easy to create a regular expression based24 * {@link workbox-routing.Route}.25 *26 * For same-origin requests the RegExp only needs to match part of the URL. For27 * requests against third-party servers, you must define a RegExp that matches28 * the start of the URL.29 *30 * @memberof workbox-routing31 * @extends workbox-routing.Route32 */33class RegExpRoute extends Route {34 /**35 * If the regular expression contains36 * [capture groups]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp#grouping-back-references},37 * the captured values will be passed to the38 * {@link workbox-routing~handlerCallback} `params`39 * argument.40 *41 * @param {RegExp} regExp The regular expression to match against URLs.42 * @param {workbox-routing~handlerCallback} handler A callback43 * function that returns a Promise resulting in a Response.44 * @param {string} [method='GET'] The HTTP method to match the Route45 * against.46 */47 constructor(regExp: RegExp, handler: RouteHandler, method?: HTTPMethod) {48 if (process.env.NODE_ENV !== 'production') {49 assert!.isInstance(regExp, RegExp, {50 moduleName: 'workbox-routing',51 className: 'RegExpRoute',52 funcName: 'constructor',53 paramName: 'pattern',54 });55 }56 57 const match: RouteMatchCallback = ({url}: RouteMatchCallbackOptions) => {58 const result = regExp.exec(url.href);59 60 // Return immediately if there's no match.61 if (!result) {62 return;63 }64 65 // Require that the match start at the first character in the URL string66 // if it's a cross-origin request.67 // See https://github.com/GoogleChrome/workbox/issues/281 for the context68 // behind this behavior.69 if (url.origin !== location.origin && result.index !== 0) {70 if (process.env.NODE_ENV !== 'production') {71 logger.debug(72 `The regular expression '${regExp.toString()}' only partially matched ` +73 `against the cross-origin URL '${url.toString()}'. RegExpRoute's will only ` +74 `handle cross-origin requests if they match the entire URL.`,75 );76 }77 78 return;79 }80 81 // If the route matches, but there aren't any capture groups defined, then82 // this will return [], which is truthy and therefore sufficient to83 // indicate a match.84 // If there are capture groups, then it will return their values.85 return result.slice(1);86 };87 88 super(match, handler, method);89 }90}91 92export {RegExpRoute};93 