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
webSocket.js94 linesDownload Raw Back to client
1"use strict";2var __defProp = Object.defineProperty;3var __getOwnPropDesc = Object.getOwnPropertyDescriptor;4var __getOwnPropNames = Object.getOwnPropertyNames;5var __hasOwnProp = Object.prototype.hasOwnProperty;6var __export = (target, all) => {7  for (var name in all)8    __defProp(target, name, { get: all[name], enumerable: true });9};10var __copyProps = (to, from, except, desc) => {11  if (from && typeof from === "object" || typeof from === "function") {12    for (let key of __getOwnPropNames(from))13      if (!__hasOwnProp.call(to, key) && key !== except)14        __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });15  }16  return to;17};18var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);19var webSocket_exports = {};20__export(webSocket_exports, {21  connectOverWebSocket: () => connectOverWebSocket22});23module.exports = __toCommonJS(webSocket_exports);24var import_connection = require("./connection");25async function connectOverWebSocket(parentConnection, params) {26  const localUtils = parentConnection.localUtils();27  const transport = localUtils ? new JsonPipeTransport(localUtils) : new WebSocketTransport();28  const connectHeaders = await transport.connect(params);29  const connection = new import_connection.Connection(parentConnection._platform, localUtils, parentConnection._instrumentation, connectHeaders);30  connection.markAsRemote();31  connection.on("close", () => transport.close());32  let closeError;33  const onTransportClosed = (reason) => {34    connection.close(reason || closeError);35  };36  transport.onClose((reason) => onTransportClosed(reason));37  connection.onmessage = (message) => transport.send(message).catch(() => onTransportClosed());38  transport.onMessage((message) => {39    try {40      connection.dispatch(message);41    } catch (e) {42      closeError = String(e);43      transport.close().catch(() => {44      });45    }46  });47  return connection;48}49class JsonPipeTransport {50  constructor(owner) {51    this._owner = owner;52  }53  async connect(params) {54    const { pipe, headers: connectHeaders } = await this._owner._channel.connect(params);55    this._pipe = pipe;56    return connectHeaders;57  }58  async send(message) {59    await this._pipe.send({ message });60  }61  onMessage(callback) {62    this._pipe.on("message", ({ message }) => callback(message));63  }64  onClose(callback) {65    this._pipe.on("closed", ({ reason }) => callback(reason));66  }67  async close() {68    await this._pipe.close().catch(() => {69    });70  }71}72class WebSocketTransport {73  async connect(params) {74    this._ws = new window.WebSocket(params.wsEndpoint);75    return [];76  }77  async send(message) {78    this._ws.send(JSON.stringify(message));79  }80  onMessage(callback) {81    this._ws.addEventListener("message", (event) => callback(JSON.parse(event.data)));82  }83  onClose(callback) {84    this._ws.addEventListener("close", () => callback());85  }86  async close() {87    this._ws.close();88  }89}90// Annotate the CommonJS export names for ESM import in node:910 && (module.exports = {92  connectOverWebSocket93});94 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai