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
browser.js164 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 browser_exports = {};20__export(browser_exports, {21  Browser: () => Browser22});23module.exports = __toCommonJS(browser_exports);24var import_artifact = require("./artifact");25var import_browserContext = require("./browserContext");26var import_cdpSession = require("./cdpSession");27var import_channelOwner = require("./channelOwner");28var import_errors = require("./errors");29var import_events = require("./events");30var import_fileUtils = require("./fileUtils");31class Browser extends import_channelOwner.ChannelOwner {32  constructor(parent, type, guid, initializer) {33    super(parent, type, guid, initializer);34    this._contexts = /* @__PURE__ */ new Set();35    this._isConnected = true;36    this._shouldCloseConnectionOnClose = false;37    this._options = {};38    this._name = initializer.name;39    this._channel.on("context", ({ context }) => this._didCreateContext(import_browserContext.BrowserContext.from(context)));40    this._channel.on("close", () => this._didClose());41    this._closedPromise = new Promise((f) => this.once(import_events.Events.Browser.Disconnected, f));42  }43  static from(browser) {44    return browser._object;45  }46  browserType() {47    return this._browserType;48  }49  async newContext(options = {}) {50    return await this._innerNewContext(options, false);51  }52  async _newContextForReuse(options = {}) {53    return await this._innerNewContext(options, true);54  }55  async _disconnectFromReusedContext(reason) {56    const context = [...this._contexts].find((context2) => context2._forReuse);57    if (!context)58      return;59    await this._instrumentation.runBeforeCloseBrowserContext(context);60    for (const page of context.pages())61      page._onClose();62    context._onClose();63    await this._channel.disconnectFromReusedContext({ reason });64  }65  async _innerNewContext(options = {}, forReuse) {66    options = this._browserType._playwright.selectors._withSelectorOptions({67      ...this._browserType._playwright._defaultContextOptions,68      ...options69    });70    const contextOptions = await (0, import_browserContext.prepareBrowserContextParams)(this._platform, options);71    const response = forReuse ? await this._channel.newContextForReuse(contextOptions) : await this._channel.newContext(contextOptions);72    const context = import_browserContext.BrowserContext.from(response.context);73    if (forReuse)74      context._forReuse = true;75    if (options.logger)76      context._logger = options.logger;77    await context._initializeHarFromOptions(options.recordHar);78    await this._instrumentation.runAfterCreateBrowserContext(context);79    return context;80  }81  _connectToBrowserType(browserType, browserOptions, logger) {82    this._browserType = browserType;83    this._options = browserOptions;84    this._logger = logger;85    for (const context of this._contexts)86      this._setupBrowserContext(context);87  }88  _didCreateContext(context) {89    context._browser = this;90    this._contexts.add(context);91    if (this._browserType)92      this._setupBrowserContext(context);93  }94  _setupBrowserContext(context) {95    context._logger = this._logger;96    context.tracing._tracesDir = this._options.tracesDir;97    this._browserType._contexts.add(context);98    this._browserType._playwright.selectors._contextsForSelectors.add(context);99    context.setDefaultTimeout(this._browserType._playwright._defaultContextTimeout);100    context.setDefaultNavigationTimeout(this._browserType._playwright._defaultContextNavigationTimeout);101  }102  contexts() {103    return [...this._contexts];104  }105  version() {106    return this._initializer.version;107  }108  async newPage(options = {}) {109    return await this._wrapApiCall(async () => {110      const context = await this.newContext(options);111      const page = await context.newPage();112      page._ownedContext = context;113      context._ownerPage = page;114      return page;115    }, { title: "Create page" });116  }117  isConnected() {118    return this._isConnected;119  }120  async newBrowserCDPSession() {121    return import_cdpSession.CDPSession.from((await this._channel.newBrowserCDPSession()).session);122  }123  async startTracing(page, options = {}) {124    this._path = options.path;125    await this._channel.startTracing({ ...options, page: page ? page._channel : void 0 });126  }127  async stopTracing() {128    const artifact = import_artifact.Artifact.from((await this._channel.stopTracing()).artifact);129    const buffer = await artifact.readIntoBuffer();130    await artifact.delete();131    if (this._path) {132      await (0, import_fileUtils.mkdirIfNeeded)(this._platform, this._path);133      await this._platform.fs().promises.writeFile(this._path, buffer);134      this._path = void 0;135    }136    return buffer;137  }138  async [Symbol.asyncDispose]() {139    await this.close();140  }141  async close(options = {}) {142    this._closeReason = options.reason;143    try {144      if (this._shouldCloseConnectionOnClose)145        this._connection.close();146      else147        await this._channel.close(options);148      await this._closedPromise;149    } catch (e) {150      if ((0, import_errors.isTargetClosedError)(e))151        return;152      throw e;153    }154  }155  _didClose() {156    this._isConnected = false;157    this.emit(import_events.Events.Browser.Disconnected, this);158  }159}160// Annotate the CommonJS export names for ESM import in node:1610 && (module.exports = {162  Browser163});164 
Brunobkr/llama.cpp_AlgMor24_github · Team Ai