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
1import type {AnySchemaObject, SchemaObject, JTDParser} from "./types"2import type {JTDSchemaType, SomeJTDSchemaType, JTDDataType} from "./types/jtd-schema"3import AjvCore, {CurrentOptions} from "./core"4import jtdVocabulary from "./vocabularies/jtd"5import jtdMetaSchema from "./refs/jtd-schema"6import compileSerializer from "./compile/jtd/serialize"7import compileParser from "./compile/jtd/parse"8import {SchemaEnv} from "./compile"9 10const META_SCHEMA_ID = "JTD-meta-schema"11 12type JTDOptions = CurrentOptions & {13 // strict mode options not supported with JTD:14 strict?: never15 allowMatchingProperties?: never16 allowUnionTypes?: never17 validateFormats?: never18 // validation and reporting options not supported with JTD:19 $data?: never20 verbose?: boolean21 $comment?: never22 formats?: never23 loadSchema?: never24 // options to modify validated data:25 useDefaults?: never26 coerceTypes?: never27 // advanced options:28 next?: never29 unevaluated?: never30 dynamicRef?: never31 meta?: boolean32 defaultMeta?: never33 inlineRefs?: boolean34 loopRequired?: never35 multipleOfPrecision?: never36}37 38export class Ajv extends AjvCore {39 constructor(opts: JTDOptions = {}) {40 super({41 ...opts,42 jtd: true,43 })44 }45 46 _addVocabularies(): void {47 super._addVocabularies()48 this.addVocabulary(jtdVocabulary)49 }50 51 _addDefaultMetaSchema(): void {52 super._addDefaultMetaSchema()53 if (!this.opts.meta) return54 this.addMetaSchema(jtdMetaSchema, META_SCHEMA_ID, false)55 }56 57 defaultMeta(): string | AnySchemaObject | undefined {58 return (this.opts.defaultMeta =59 super.defaultMeta() || (this.getSchema(META_SCHEMA_ID) ? META_SCHEMA_ID : undefined))60 }61 62 compileSerializer<T = unknown>(schema: SchemaObject): (data: T) => string63 // Separated for type inference to work64 // eslint-disable-next-line @typescript-eslint/unified-signatures65 compileSerializer<T = unknown>(schema: JTDSchemaType<T>): (data: T) => string66 compileSerializer<T = unknown>(schema: SchemaObject): (data: T) => string {67 const sch = this._addSchema(schema)68 return sch.serialize || this._compileSerializer(sch)69 }70 71 compileParser<T = unknown>(schema: SchemaObject): JTDParser<T>72 // Separated for type inference to work73 // eslint-disable-next-line @typescript-eslint/unified-signatures74 compileParser<T = unknown>(schema: JTDSchemaType<T>): JTDParser<T>75 compileParser<T = unknown>(schema: SchemaObject): JTDParser<T> {76 const sch = this._addSchema(schema)77 return (sch.parse || this._compileParser(sch)) as JTDParser<T>78 }79 80 private _compileSerializer<T>(sch: SchemaEnv): (data: T) => string {81 compileSerializer.call(this, sch, (sch.schema as AnySchemaObject).definitions || {})82 /* istanbul ignore if */83 if (!sch.serialize) throw new Error("ajv implementation error")84 return sch.serialize85 }86 87 private _compileParser(sch: SchemaEnv): JTDParser {88 compileParser.call(this, sch, (sch.schema as AnySchemaObject).definitions || {})89 /* istanbul ignore if */90 if (!sch.parse) throw new Error("ajv implementation error")91 return sch.parse92 }93}94 95module.exports = exports = Ajv96module.exports.Ajv = Ajv97Object.defineProperty(exports, "__esModule", {value: true})98 99export default Ajv100 101export {102 Format,103 FormatDefinition,104 AsyncFormatDefinition,105 KeywordDefinition,106 KeywordErrorDefinition,107 CodeKeywordDefinition,108 MacroKeywordDefinition,109 FuncKeywordDefinition,110 Vocabulary,111 Schema,112 SchemaObject,113 AnySchemaObject,114 AsyncSchema,115 AnySchema,116 ValidateFunction,117 AsyncValidateFunction,118 ErrorObject,119 ErrorNoParams,120 JTDParser,121} from "./types"122 123export {Plugin, Options, CodeOptions, InstanceOptions, Logger, ErrorsTextOptions} from "./core"124export {SchemaCxt, SchemaObjCxt} from "./compile"125export {KeywordCxt} from "./compile/validate"126export {JTDErrorObject} from "./vocabularies/jtd"127export {_, str, stringify, nil, Name, Code, CodeGen, CodeGenOptions} from "./compile/codegen"128 129export {JTDSchemaType, SomeJTDSchemaType, JTDDataType}130export {JTDOptions}131export {default as ValidationError} from "./runtime/validation_error"132export {default as MissingRefError} from "./compile/ref_error"133 