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
bidiOverCdp.js103 linesDownload Raw Back to bidi
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 bidiOverCdp_exports = {};30__export(bidiOverCdp_exports, {31  connectBidiOverCdp: () => connectBidiOverCdp32});33module.exports = __toCommonJS(bidiOverCdp_exports);34var bidiMapper = __toESM(require("chromium-bidi/lib/cjs/bidiMapper/BidiMapper"));35var bidiCdpConnection = __toESM(require("chromium-bidi/lib/cjs/cdp/CdpConnection"));36var import_debugLogger = require("../utils/debugLogger");37const bidiServerLogger = (prefix, ...args) => {38  import_debugLogger.debugLogger.log(prefix, args);39};40async function connectBidiOverCdp(cdp) {41  let server = void 0;42  const bidiTransport = new BidiTransportImpl();43  const bidiConnection = new BidiConnection(bidiTransport, () => server?.close());44  const cdpTransportImpl = new CdpTransportImpl(cdp);45  const cdpConnection = new bidiCdpConnection.MapperCdpConnection(cdpTransportImpl, bidiServerLogger);46  cdp.onclose = () => bidiConnection.onclose?.();47  server = await bidiMapper.BidiServer.createAndStart(48    bidiTransport,49    cdpConnection,50    await cdpConnection.createBrowserSession(),51    /* selfTargetId= */52    "",53    void 0,54    bidiServerLogger55  );56  return bidiConnection;57}58class BidiTransportImpl {59  setOnMessage(handler) {60    this._handler = handler;61  }62  sendMessage(message) {63    return this._bidiConnection.onmessage?.(message);64  }65  close() {66    this._bidiConnection.onclose?.();67  }68}69class BidiConnection {70  constructor(bidiTransport, closeCallback) {71    this._bidiTransport = bidiTransport;72    this._bidiTransport._bidiConnection = this;73    this._closeCallback = closeCallback;74  }75  send(s) {76    this._bidiTransport._handler?.(s);77  }78  close() {79    this._closeCallback();80  }81}82class CdpTransportImpl {83  constructor(connection) {84    this._connection = connection;85    this._connection.onmessage = (message) => {86      this._handler?.(JSON.stringify(message));87    };88  }89  setOnMessage(handler) {90    this._handler = handler;91  }92  sendMessage(message) {93    return this._connection.send(JSON.parse(message));94  }95  close() {96    this._connection.close();97  }98}99// Annotate the CommonJS export names for ESM import in node:1000 && (module.exports = {101  connectBidiOverCdp102});103 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai