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 * fresh3 * Copyright(c) 2012 TJ Holowaychuk4 * Copyright(c) 2016-2017 Douglas Christopher Wilson5 * MIT Licensed6 */7 8'use strict'9 10/**11 * RegExp to check for no-cache token in Cache-Control.12 * @private13 */14 15var CACHE_CONTROL_NO_CACHE_REGEXP = /(?:^|,)\s*?no-cache\s*?(?:,|$)/16 17/**18 * Module exports.19 * @public20 */21 22module.exports = fresh23 24/**25 * Check freshness of the response using request and response headers.26 *27 * @param {Object} reqHeaders28 * @param {Object} resHeaders29 * @return {Boolean}30 * @public31 */32 33function fresh (reqHeaders, resHeaders) {34 // fields35 var modifiedSince = reqHeaders['if-modified-since']36 var noneMatch = reqHeaders['if-none-match']37 38 // unconditional request39 if (!modifiedSince && !noneMatch) {40 return false41 }42 43 // Always return stale when Cache-Control: no-cache44 // to support end-to-end reload requests45 // https://tools.ietf.org/html/rfc2616#section-14.9.446 var cacheControl = reqHeaders['cache-control']47 if (cacheControl && CACHE_CONTROL_NO_CACHE_REGEXP.test(cacheControl)) {48 return false49 }50 51 // if-none-match takes precedent over if-modified-since52 if (noneMatch) {53 if (noneMatch === '*') {54 return true55 }56 var etag = resHeaders.etag57 58 if (!etag) {59 return false60 }61 62 var matches = parseTokenList(noneMatch)63 for (var i = 0; i < matches.length; i++) {64 var match = matches[i]65 if (match === etag || match === 'W/' + etag || 'W/' + match === etag) {66 return true67 }68 }69 70 return false71 }72 73 // if-modified-since74 if (modifiedSince) {75 var lastModified = resHeaders['last-modified']76 var modifiedStale = !lastModified || !(parseHttpDate(lastModified) <= parseHttpDate(modifiedSince))77 78 if (modifiedStale) {79 return false80 }81 }82 83 return true84}85 86/**87 * Parse an HTTP Date into a number.88 *89 * @param {string} date90 * @private91 */92 93function parseHttpDate (date) {94 var timestamp = date && Date.parse(date)95 96 // istanbul ignore next: guard against date.js Date.parse patching97 return typeof timestamp === 'number'98 ? timestamp99 : NaN100}101 102/**103 * Parse a HTTP token list.104 *105 * @param {string} str106 * @private107 */108 109function parseTokenList (str) {110 var end = 0111 var list = []112 var start = 0113 114 // gather tokens115 for (var i = 0, len = str.length; i < len; i++) {116 switch (str.charCodeAt(i)) {117 case 0x20: /* */118 if (start === end) {119 start = end = i + 1120 }121 break122 case 0x2c: /* , */123 list.push(str.substring(start, end))124 start = end = i + 1125 break126 default:127 end = i + 1128 break129 }130 }131 132 // final token133 list.push(str.substring(start, end))134 135 return list136}137 