Team Ai
Datasetpublic

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.

sourceHugging Faceupdated 2mo agoView on Hugging Face
0likes3.1kdownloads
CacheOnly.ts73 linesDownload Raw Back to src
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 {WorkboxError} from 'workbox-core/_private/WorkboxError.js';12 13import {Strategy} from './Strategy.js';14import {StrategyHandler} from './StrategyHandler.js';15import {messages} from './utils/messages.js';16import './_version.js';17 18/**19 * An implementation of a [cache-only](https://developer.chrome.com/docs/workbox/caching-strategies-overview/#cache-only)20 * request strategy.21 *22 * This class is useful if you want to take advantage of any23 * [Workbox plugins](https://developer.chrome.com/docs/workbox/using-plugins/).24 *25 * If there is no cache match, this will throw a `WorkboxError` exception.26 *27 * @extends workbox-strategies.Strategy28 * @memberof workbox-strategies29 */30class CacheOnly extends Strategy {31  /**32   * @private33   * @param {Request|string} request A request to run this strategy for.34   * @param {workbox-strategies.StrategyHandler} handler The event that35   *     triggered the request.36   * @return {Promise<Response>}37   */38  async _handle(request: Request, handler: StrategyHandler): Promise<Response> {39    if (process.env.NODE_ENV !== 'production') {40      assert!.isInstance(request, Request, {41        moduleName: 'workbox-strategies',42        className: this.constructor.name,43        funcName: 'makeRequest',44        paramName: 'request',45      });46    }47 48    const response = await handler.cacheMatch(request);49 50    if (process.env.NODE_ENV !== 'production') {51      logger.groupCollapsed(52        messages.strategyStart(this.constructor.name, request),53      );54      if (response) {55        logger.log(56          `Found a cached response in the '${this.cacheName}' ` + `cache.`,57        );58        messages.printFinalResponse(response);59      } else {60        logger.log(`No response found in the '${this.cacheName}' cache.`);61      }62      logger.groupEnd();63    }64 65    if (!response) {66      throw new WorkboxError('no-response', {url: request.url});67    }68    return response;69  }70}71 72export {CacheOnly};73 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai