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
wkExecutionContext.js155 linesDownload Raw Back to webkit
1"use strict";2var __create = Object.create;3var __defProp = Object.defineProperty;4var __getOwnPropDesc = Object.getOwnPropertyDescriptor;5var __getOwnPropNames = Object.getOwnPropertyNames;6var __getProtoOf = Object.getPrototypeOf;7var __hasOwnProp = Object.prototype.hasOwnProperty;8var __export = (target, all) => {9  for (var name in all)10    __defProp(target, name, { get: all[name], enumerable: true });11};12var __copyProps = (to, from, except, desc) => {13  if (from && typeof from === "object" || typeof from === "function") {14    for (let key of __getOwnPropNames(from))15      if (!__hasOwnProp.call(to, key) && key !== except)16        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });17  }18  return to;19};20var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(21  // If the importer is in node compatibility mode or this is not an ESM22  // file that has been converted to a CommonJS file using a Babel-23  // compatible transform (i.e. "__esModule" has not been set), then set24  // "default" to the CommonJS "module.exports" for node compatibility.25  isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,26  mod27));28var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);29var wkExecutionContext_exports = {};30__export(wkExecutionContext_exports, {31  WKExecutionContext: () => WKExecutionContext,32  createHandle: () => createHandle33});34module.exports = __toCommonJS(wkExecutionContext_exports);35var js = __toESM(require("../javascript"));36var dom = __toESM(require("../dom"));37var import_protocolError = require("../protocolError");38var import_assert = require("../../utils/isomorphic/assert");39var import_utilityScriptSerializers = require("../../utils/isomorphic/utilityScriptSerializers");40class WKExecutionContext {41  constructor(session, contextId) {42    this._session = session;43    this._contextId = contextId;44  }45  async rawEvaluateJSON(expression) {46    try {47      const response = await this._session.send("Runtime.evaluate", {48        expression,49        contextId: this._contextId,50        returnByValue: true51      });52      if (response.wasThrown)53        throw new js.JavaScriptErrorInEvaluate(response.result.description);54      return response.result.value;55    } catch (error) {56      throw rewriteError(error);57    }58  }59  async rawEvaluateHandle(context, expression) {60    try {61      const response = await this._session.send("Runtime.evaluate", {62        expression,63        contextId: this._contextId,64        returnByValue: false65      });66      if (response.wasThrown)67        throw new js.JavaScriptErrorInEvaluate(response.result.description);68      return createHandle(context, response.result);69    } catch (error) {70      throw rewriteError(error);71    }72  }73  async evaluateWithArguments(expression, returnByValue, utilityScript, values, handles) {74    try {75      const response = await this._session.send("Runtime.callFunctionOn", {76        functionDeclaration: expression,77        objectId: utilityScript._objectId,78        arguments: [79          { objectId: utilityScript._objectId },80          ...values.map((value) => ({ value })),81          ...handles.map((handle) => ({ objectId: handle._objectId }))82        ],83        returnByValue,84        emulateUserGesture: true,85        awaitPromise: true86      });87      if (response.wasThrown)88        throw new js.JavaScriptErrorInEvaluate(response.result.description);89      if (returnByValue)90        return (0, import_utilityScriptSerializers.parseEvaluationResultValue)(response.result.value);91      return createHandle(utilityScript._context, response.result);92    } catch (error) {93      throw rewriteError(error);94    }95  }96  async getProperties(object) {97    const response = await this._session.send("Runtime.getProperties", {98      objectId: object._objectId,99      ownProperties: true100    });101    const result = /* @__PURE__ */ new Map();102    for (const property of response.properties) {103      if (!property.enumerable || !property.value)104        continue;105      result.set(property.name, createHandle(object._context, property.value));106    }107    return result;108  }109  async releaseHandle(handle) {110    if (!handle._objectId)111      return;112    await this._session.send("Runtime.releaseObject", { objectId: handle._objectId });113  }114}115function potentiallyUnserializableValue(remoteObject) {116  const value = remoteObject.value;117  const isUnserializable = remoteObject.type === "number" && ["NaN", "-Infinity", "Infinity", "-0"].includes(remoteObject.description);118  return isUnserializable ? js.parseUnserializableValue(remoteObject.description) : value;119}120function rewriteError(error) {121  if (error.message.includes("Object has too long reference chain"))122    throw new Error("Cannot serialize result: object reference chain is too long.");123  if (!js.isJavaScriptErrorInEvaluate(error) && !(0, import_protocolError.isSessionClosedError)(error))124    return new Error("Execution context was destroyed, most likely because of a navigation.");125  return error;126}127function renderPreview(object) {128  if (object.type === "undefined")129    return "undefined";130  if ("value" in object)131    return String(object.value);132  if (object.description === "Object" && object.preview) {133    const tokens = [];134    for (const { name, value } of object.preview.properties)135      tokens.push(`${name}: ${value}`);136    return `{${tokens.join(", ")}}`;137  }138  if (object.subtype === "array" && object.preview)139    return js.sparseArrayToString(object.preview.properties);140  return object.description;141}142function createHandle(context, remoteObject) {143  if (remoteObject.subtype === "node") {144    (0, import_assert.assert)(context instanceof dom.FrameExecutionContext);145    return new dom.ElementHandle(context, remoteObject.objectId);146  }147  const isPromise = remoteObject.className === "Promise";148  return new js.JSHandle(context, isPromise ? "promise" : remoteObject.subtype || remoteObject.type, renderPreview(remoteObject), remoteObject.objectId, potentiallyUnserializableValue(remoteObject));149}150// Annotate the CommonJS export names for ESM import in node:1510 && (module.exports = {152  WKExecutionContext,153  createHandle154});155 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai