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
utils.js101 linesDownload Raw Back to lib
1'use strict'2 3/**4 * Module dependencies.5 */6 7const bytes = require('bytes')8const contentType = require('content-type')9const typeis = require('type-is')10 11/**12 * Module exports.13 */14module.exports = {15  getCharset,16  normalizeOptions,17  passthrough18}19 20/**21 * Get the charset of a request.22 *23 * @param {Object} req24 * @returns {string | undefined}25 * @private26 */27function getCharset (req) {28  const header = req.headers['content-type']29  if (!header) return undefined30  return contentType.parse(header).parameters.charset?.toLowerCase()31}32 33/**34 * Get the simple type checker.35 *36 * @param {string | string[]} type37 * @returns {Function}38 * @private39 */40function typeChecker (type) {41  return function checkType (req) {42    return Boolean(typeis(req, type))43  }44}45 46/**47 * Normalizes the common options for all parsers.48 *49 * @param {Object} options options to normalize50 * @param {string | string[] | Function} defaultType default content type(s) or a function to determine it51 * @returns {Object}52 * @private53 */54function normalizeOptions (options, defaultType) {55  if (!defaultType) {56    // Parsers must define a default content type57    throw new TypeError('defaultType must be provided')58  }59 60  const inflate = options?.inflate !== false61  const limit = typeof options?.limit === 'undefined' || options?.limit === null62    ? 102400 // 100kb default63    : bytes.parse(options.limit)64  const type = options?.type || defaultType65  const verify = options?.verify || false66  const defaultCharset = options?.defaultCharset || 'utf-8'67 68  if (limit === null) {69    throw new TypeError(`option limit "${String(options.limit)}" is invalid`)70  }71 72  if (verify !== false && typeof verify !== 'function') {73    throw new TypeError('option verify must be function')74  }75 76  // create the appropriate type checking function77  const shouldParse = typeof type !== 'function'78    ? typeChecker(type)79    : type80 81  return {82    inflate,83    limit,84    verify,85    defaultCharset,86    shouldParse87  }88}89 90/**91 * Passthrough function that returns input unchanged.92 * Used by parsers that don't need to transform the data.93 *94 * @param {*} value95 * @returns {*}96 * @private97 */98function passthrough (value) {99  return value100}101 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai