mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 14:00:49 +00:00
nhj
more
This commit is contained in:
21
unified-ai-platform/node_modules/@webassemblyjs/ieee754/LICENSE
generated
vendored
Normal file
21
unified-ai-platform/node_modules/@webassemblyjs/ieee754/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2018 Sven Sauleau <sven@sauleau.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
33
unified-ai-platform/node_modules/@webassemblyjs/ieee754/esm/index.js
generated
vendored
Normal file
33
unified-ai-platform/node_modules/@webassemblyjs/ieee754/esm/index.js
generated
vendored
Normal file
@@ -0,0 +1,33 @@
|
||||
import { write, read } from "@xtuc/ieee754";
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 32/8
|
||||
*/
|
||||
|
||||
export var NUMBER_OF_BYTE_F32 = 4;
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 64/8
|
||||
*/
|
||||
|
||||
export var NUMBER_OF_BYTE_F64 = 8;
|
||||
export var SINGLE_PRECISION_MANTISSA = 23;
|
||||
export var DOUBLE_PRECISION_MANTISSA = 52;
|
||||
export function encodeF32(v) {
|
||||
var buffer = [];
|
||||
write(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
return buffer;
|
||||
}
|
||||
export function encodeF64(v) {
|
||||
var buffer = [];
|
||||
write(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
return buffer;
|
||||
}
|
||||
export function decodeF32(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return read(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
}
|
||||
export function decodeF64(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return read(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
}
|
||||
52
unified-ai-platform/node_modules/@webassemblyjs/ieee754/lib/index.js
generated
vendored
Normal file
52
unified-ai-platform/node_modules/@webassemblyjs/ieee754/lib/index.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.encodeF32 = encodeF32;
|
||||
exports.encodeF64 = encodeF64;
|
||||
exports.decodeF32 = decodeF32;
|
||||
exports.decodeF64 = decodeF64;
|
||||
exports.DOUBLE_PRECISION_MANTISSA = exports.SINGLE_PRECISION_MANTISSA = exports.NUMBER_OF_BYTE_F64 = exports.NUMBER_OF_BYTE_F32 = void 0;
|
||||
|
||||
var _ieee = require("@xtuc/ieee754");
|
||||
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 32/8
|
||||
*/
|
||||
var NUMBER_OF_BYTE_F32 = 4;
|
||||
/**
|
||||
* According to https://webassembly.github.io/spec/binary/values.html#binary-float
|
||||
* n = 64/8
|
||||
*/
|
||||
|
||||
exports.NUMBER_OF_BYTE_F32 = NUMBER_OF_BYTE_F32;
|
||||
var NUMBER_OF_BYTE_F64 = 8;
|
||||
exports.NUMBER_OF_BYTE_F64 = NUMBER_OF_BYTE_F64;
|
||||
var SINGLE_PRECISION_MANTISSA = 23;
|
||||
exports.SINGLE_PRECISION_MANTISSA = SINGLE_PRECISION_MANTISSA;
|
||||
var DOUBLE_PRECISION_MANTISSA = 52;
|
||||
exports.DOUBLE_PRECISION_MANTISSA = DOUBLE_PRECISION_MANTISSA;
|
||||
|
||||
function encodeF32(v) {
|
||||
var buffer = [];
|
||||
(0, _ieee.write)(buffer, v, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function encodeF64(v) {
|
||||
var buffer = [];
|
||||
(0, _ieee.write)(buffer, v, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
return buffer;
|
||||
}
|
||||
|
||||
function decodeF32(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return (0, _ieee.read)(buffer, 0, true, SINGLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F32);
|
||||
}
|
||||
|
||||
function decodeF64(bytes) {
|
||||
var buffer = new Uint8Array(bytes);
|
||||
return (0, _ieee.read)(buffer, 0, true, DOUBLE_PRECISION_MANTISSA, NUMBER_OF_BYTE_F64);
|
||||
}
|
||||
Reference in New Issue
Block a user