webpack esm fuckery
This commit is contained in:
parent
283d516331
commit
38d4b00672
@ -1,5 +1,5 @@
|
||||
{
|
||||
"timestamp": 1740082075501,
|
||||
"timestamp": 1740494846633,
|
||||
"models": [
|
||||
{
|
||||
"id": "gpt-4o-mini-audio-preview-2024-12-17",
|
||||
@ -73,6 +73,12 @@
|
||||
"created": 1734387380,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-2024-11-20",
|
||||
"object": "model",
|
||||
"created": 1739331543,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "whisper-1",
|
||||
"object": "model",
|
||||
@ -97,12 +103,30 @@
|
||||
"created": 1727131766,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4",
|
||||
"object": "model",
|
||||
"created": 1687882411,
|
||||
"owned_by": "openai"
|
||||
},
|
||||
{
|
||||
"id": "babbage-002",
|
||||
"object": "model",
|
||||
"created": 1692634615,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4-0125-preview",
|
||||
"object": "model",
|
||||
"created": 1706037612,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4-turbo-preview",
|
||||
"object": "model",
|
||||
"created": 1706037777,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "tts-1-hd-1106",
|
||||
"object": "model",
|
||||
@ -116,15 +140,9 @@
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "tts-1-hd",
|
||||
"id": "gpt-4o",
|
||||
"object": "model",
|
||||
"created": 1699046015,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "text-embedding-3-large",
|
||||
"object": "model",
|
||||
"created": 1705953180,
|
||||
"created": 1715367049,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
@ -133,6 +151,18 @@
|
||||
"created": 1722814719,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "tts-1-hd",
|
||||
"object": "model",
|
||||
"created": 1699046015,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-2024-05-13",
|
||||
"object": "model",
|
||||
"created": 1715368132,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "tts-1",
|
||||
"object": "model",
|
||||
@ -176,9 +206,9 @@
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o",
|
||||
"id": "gpt-4o-mini-2024-07-18",
|
||||
"object": "model",
|
||||
"created": 1715367049,
|
||||
"created": 1721172717,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
@ -193,6 +223,12 @@
|
||||
"created": 1706048358,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-mini",
|
||||
"object": "model",
|
||||
"created": 1721172741,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-realtime-preview-2024-12-17",
|
||||
"object": "model",
|
||||
@ -217,30 +253,12 @@
|
||||
"created": 1683758102,
|
||||
"owned_by": "openai-internal"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-2024-11-20",
|
||||
"object": "model",
|
||||
"created": 1739331543,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "text-embedding-3-small",
|
||||
"object": "model",
|
||||
"created": 1705948997,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4",
|
||||
"object": "model",
|
||||
"created": 1687882411,
|
||||
"owned_by": "openai"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-mini-2024-07-18",
|
||||
"object": "model",
|
||||
"created": 1721172717,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4-1106-preview",
|
||||
"object": "model",
|
||||
@ -253,12 +271,6 @@
|
||||
"created": 1671217299,
|
||||
"owned_by": "openai-internal"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-mini",
|
||||
"object": "model",
|
||||
"created": 1721172741,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "omni-moderation-latest",
|
||||
"object": "model",
|
||||
@ -272,21 +284,9 @@
|
||||
"owned_by": "openai"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4-turbo-preview",
|
||||
"id": "text-embedding-3-large",
|
||||
"object": "model",
|
||||
"created": 1706037777,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4-0125-preview",
|
||||
"object": "model",
|
||||
"created": 1706037612,
|
||||
"owned_by": "system"
|
||||
},
|
||||
{
|
||||
"id": "gpt-4o-2024-05-13",
|
||||
"object": "model",
|
||||
"created": 1715368132,
|
||||
"created": 1705953180,
|
||||
"owned_by": "system"
|
||||
}
|
||||
]
|
||||
|
||||
@ -1,16 +1,64 @@
|
||||
{
|
||||
"timestamp": 1740082075728,
|
||||
"timestamp": 1740494847233,
|
||||
"models": [
|
||||
{
|
||||
"id": "anthropic/claude-3.7-sonnet:beta",
|
||||
"name": "Anthropic: Claude 3.7 Sonnet (self-moderated)",
|
||||
"created": 1740422110,
|
||||
"description": "Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. \n\nClaude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks.\n\nRead more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
|
||||
"context_length": 200000,
|
||||
"architecture": {
|
||||
"modality": "text+image->text",
|
||||
"tokenizer": "Claude",
|
||||
"instruct_type": null
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.000003",
|
||||
"completion": "0.000015",
|
||||
"image": "0.0048",
|
||||
"request": "0"
|
||||
},
|
||||
"top_provider": {
|
||||
"context_length": 200000,
|
||||
"max_completion_tokens": 128000,
|
||||
"is_moderated": false
|
||||
},
|
||||
"per_request_limits": null
|
||||
},
|
||||
{
|
||||
"id": "anthropic/claude-3.7-sonnet",
|
||||
"name": "Anthropic: Claude 3.7 Sonnet",
|
||||
"created": 1740422110,
|
||||
"description": "Claude 3.7 Sonnet is an advanced large language model with improved reasoning, coding, and problem-solving capabilities. It introduces a hybrid reasoning approach, allowing users to choose between rapid responses and extended, step-by-step processing for complex tasks. The model demonstrates notable improvements in coding, particularly in front-end development and full-stack updates, and excels in agentic workflows, where it can autonomously navigate multi-step processes. \n\nClaude 3.7 Sonnet maintains performance parity with its predecessor in standard mode while offering an extended reasoning mode for enhanced accuracy in math, coding, and instruction-following tasks.\n\nRead more at the [blog post here](https://www.anthropic.com/news/claude-3-7-sonnet)",
|
||||
"context_length": 200000,
|
||||
"architecture": {
|
||||
"modality": "text+image->text",
|
||||
"tokenizer": "Claude",
|
||||
"instruct_type": null
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.000003",
|
||||
"completion": "0.000015",
|
||||
"image": "0.0048",
|
||||
"request": "0"
|
||||
},
|
||||
"top_provider": {
|
||||
"context_length": 200000,
|
||||
"max_completion_tokens": 128000,
|
||||
"is_moderated": true
|
||||
},
|
||||
"per_request_limits": null
|
||||
},
|
||||
{
|
||||
"id": "perplexity/r1-1776",
|
||||
"name": "Perplexity: R1 1776",
|
||||
"created": 1740004929,
|
||||
"description": "Note: As this model does not return <think> tags, thoughts will be streamed by default directly to the `content` field.\n\nR1 1776 is a version of DeepSeek-R1 that has been post-trained to remove censorship constraints related to topics restricted by the Chinese government. The model retains its original reasoning capabilities while providing direct responses to a wider range of queries. R1 1776 is an offline chat model that does not use the perplexity search subsystem.\n\nThe model was tested on a multilingual dataset of over 1,000 examples covering sensitive topics to measure its likelihood of refusal or overly filtered responses. [Evaluation Results](https://cdn-uploads.huggingface.co/production/uploads/675c8332d01f593dc90817f5/GiN2VqC5hawUgAGJ6oHla.png) Its performance on math and reasoning benchmarks remains similar to the base R1 model. [Reasoning Performance](https://cdn-uploads.huggingface.co/production/uploads/675c8332d01f593dc90817f5/n4Z9Byqp2S7sKUvCvI40R.png)\n\nRead more on the [Blog Post](https://perplexity.ai/hub/blog/open-sourcing-r1-1776)",
|
||||
"description": "R1 1776 is a version of DeepSeek-R1 that has been post-trained to remove censorship constraints related to topics restricted by the Chinese government. The model retains its original reasoning capabilities while providing direct responses to a wider range of queries. R1 1776 is an offline chat model that does not use the perplexity search subsystem.\n\nThe model was tested on a multilingual dataset of over 1,000 examples covering sensitive topics to measure its likelihood of refusal or overly filtered responses. [Evaluation Results](https://cdn-uploads.huggingface.co/production/uploads/675c8332d01f593dc90817f5/GiN2VqC5hawUgAGJ6oHla.png) Its performance on math and reasoning benchmarks remains similar to the base R1 model. [Reasoning Performance](https://cdn-uploads.huggingface.co/production/uploads/675c8332d01f593dc90817f5/n4Z9Byqp2S7sKUvCvI40R.png)\n\nRead more on the [Blog Post](https://perplexity.ai/hub/blog/open-sourcing-r1-1776)",
|
||||
"context_length": 128000,
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "DeepSeek",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.000002",
|
||||
@ -178,7 +226,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Llama3",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.00000004",
|
||||
@ -207,7 +255,7 @@
|
||||
"pricing": {
|
||||
"prompt": "0.0000001",
|
||||
"completion": "0.0000004",
|
||||
"image": "0",
|
||||
"image": "0.0000258",
|
||||
"request": "0"
|
||||
},
|
||||
"top_provider": {
|
||||
@ -490,7 +538,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Other",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.00000018",
|
||||
@ -562,7 +610,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Qwen",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.00000012",
|
||||
@ -586,7 +634,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Qwen",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.0000016",
|
||||
@ -706,7 +754,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Llama3",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0",
|
||||
@ -730,7 +778,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Llama3",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.00000023",
|
||||
@ -778,7 +826,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "DeepSeek",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0",
|
||||
@ -802,7 +850,7 @@
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "DeepSeek",
|
||||
"instruct_type": null
|
||||
"instruct_type": "deepseek-r1"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.0000008",
|
||||
@ -973,14 +1021,14 @@
|
||||
"instruct_type": null
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0.0000009",
|
||||
"completion": "0.0000009",
|
||||
"prompt": "0.00000125",
|
||||
"completion": "0.00000125",
|
||||
"image": "0",
|
||||
"request": "0"
|
||||
},
|
||||
"top_provider": {
|
||||
"context_length": 131072,
|
||||
"max_completion_tokens": null,
|
||||
"max_completion_tokens": 2048,
|
||||
"is_moderated": false
|
||||
},
|
||||
"per_request_limits": null
|
||||
@ -2161,6 +2209,30 @@
|
||||
},
|
||||
"per_request_limits": null
|
||||
},
|
||||
{
|
||||
"id": "meta-llama/llama-3.2-1b-instruct:free",
|
||||
"name": "Meta: Llama 3.2 1B Instruct (free)",
|
||||
"created": 1727222400,
|
||||
"description": "Llama 3.2 1B is a 1-billion-parameter language model focused on efficiently performing natural language tasks, such as summarization, dialogue, and multilingual text analysis. Its smaller size allows it to operate efficiently in low-resource environments while maintaining strong task performance.\n\nSupporting eight core languages and fine-tunable for more, Llama 1.3B is ideal for businesses or developers seeking lightweight yet powerful AI solutions that can operate in diverse multilingual settings without the high computational demand of larger models.\n\nClick here for the [original model card](https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/MODEL_CARD.md).\n\nUsage of this model is subject to [Meta's Acceptable Use Policy](https://www.llama.com/llama3/use-policy/).",
|
||||
"context_length": 131072,
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Llama3",
|
||||
"instruct_type": "llama3"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0",
|
||||
"completion": "0",
|
||||
"image": "0",
|
||||
"request": "0"
|
||||
},
|
||||
"top_provider": {
|
||||
"context_length": 131072,
|
||||
"max_completion_tokens": null,
|
||||
"is_moderated": false
|
||||
},
|
||||
"per_request_limits": null
|
||||
},
|
||||
{
|
||||
"id": "meta-llama/llama-3.2-1b-instruct",
|
||||
"name": "Meta: Llama 3.2 1B Instruct",
|
||||
@ -2977,6 +3049,30 @@
|
||||
},
|
||||
"per_request_limits": null
|
||||
},
|
||||
{
|
||||
"id": "meta-llama/llama-3.1-8b-instruct:free",
|
||||
"name": "Meta: Llama 3.1 8B Instruct (free)",
|
||||
"created": 1721692800,
|
||||
"description": "Meta's latest class of model (Llama 3.1) launched with a variety of sizes & flavors. This 8B instruct-tuned version is fast and efficient.\n\nIt has demonstrated strong performance compared to leading closed-source models in human evaluations.\n\nTo read more about the model release, [click here](https://ai.meta.com/blog/meta-llama-3-1/). Usage of this model is subject to [Meta's Acceptable Use Policy](https://llama.meta.com/llama3/use-policy/).",
|
||||
"context_length": 131072,
|
||||
"architecture": {
|
||||
"modality": "text->text",
|
||||
"tokenizer": "Llama3",
|
||||
"instruct_type": "llama3"
|
||||
},
|
||||
"pricing": {
|
||||
"prompt": "0",
|
||||
"completion": "0",
|
||||
"image": "0",
|
||||
"request": "0"
|
||||
},
|
||||
"top_provider": {
|
||||
"context_length": 131072,
|
||||
"max_completion_tokens": null,
|
||||
"is_moderated": false
|
||||
},
|
||||
"per_request_limits": null
|
||||
},
|
||||
{
|
||||
"id": "meta-llama/llama-3.1-8b-instruct",
|
||||
"name": "Meta: Llama 3.1 8B Instruct",
|
||||
|
||||
152
packages/kbot/dist/401.main_node.js
vendored
Normal file
152
packages/kbot/dist/401.main_node.js
vendored
Normal file
@ -0,0 +1,152 @@
|
||||
#!/usr/bin/env node
|
||||
exports.id = 401;
|
||||
exports.ids = [401];
|
||||
exports.modules = {
|
||||
|
||||
/***/ 45157:
|
||||
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
||||
|
||||
/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||
|
||||
if (!globalThis.DOMException) {
|
||||
try {
|
||||
const { MessageChannel } = __webpack_require__(28167),
|
||||
port = new MessageChannel().port1,
|
||||
ab = new ArrayBuffer()
|
||||
port.postMessage(ab, [ab, ab])
|
||||
} catch (err) {
|
||||
err.constructor.name === 'DOMException' && (
|
||||
globalThis.DOMException = err.constructor
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = globalThis.DOMException
|
||||
|
||||
|
||||
/***/ }),
|
||||
|
||||
/***/ 26401:
|
||||
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {
|
||||
|
||||
"use strict";
|
||||
|
||||
// EXPORTS
|
||||
__webpack_require__.d(__webpack_exports__, {
|
||||
fileFromPath: () => (/* binding */ fileFromPath)
|
||||
});
|
||||
|
||||
// UNUSED EXPORTS: fileFromPathSync, isFile
|
||||
|
||||
// EXTERNAL MODULE: external "fs"
|
||||
var external_fs_ = __webpack_require__(79896);
|
||||
// EXTERNAL MODULE: external "path"
|
||||
var external_path_ = __webpack_require__(16928);
|
||||
// EXTERNAL MODULE: ./node_modules/node-domexception/index.js
|
||||
var node_domexception = __webpack_require__(45157);
|
||||
// EXTERNAL MODULE: ./node_modules/formdata-node/lib/esm/File.js
|
||||
var File = __webpack_require__(71831);
|
||||
;// ./node_modules/formdata-node/lib/esm/isPlainObject.js
|
||||
const getType = (value) => (Object.prototype.toString.call(value).slice(8, -1).toLowerCase());
|
||||
function isPlainObject(value) {
|
||||
if (getType(value) !== "object") {
|
||||
return false;
|
||||
}
|
||||
const pp = Object.getPrototypeOf(value);
|
||||
if (pp === null || pp === undefined) {
|
||||
return true;
|
||||
}
|
||||
const Ctor = pp.constructor && pp.constructor.toString();
|
||||
return Ctor === Object.toString();
|
||||
}
|
||||
/* harmony default export */ const esm_isPlainObject = (isPlainObject);
|
||||
|
||||
// EXTERNAL MODULE: ./node_modules/formdata-node/lib/esm/isFile.js
|
||||
var isFile = __webpack_require__(80699);
|
||||
;// ./node_modules/formdata-node/lib/esm/fileFromPath.js
|
||||
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
||||
if (kind === "m") throw new TypeError("Private method is not writable");
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
||||
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
||||
};
|
||||
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
||||
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
||||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||||
};
|
||||
var _FileFromPath_path, _FileFromPath_start;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
const MESSAGE = "The requested file could not be read, "
|
||||
+ "typically due to permission problems that have occurred after a reference "
|
||||
+ "to a file was acquired.";
|
||||
class FileFromPath {
|
||||
constructor(input) {
|
||||
_FileFromPath_path.set(this, void 0);
|
||||
_FileFromPath_start.set(this, void 0);
|
||||
__classPrivateFieldSet(this, _FileFromPath_path, input.path, "f");
|
||||
__classPrivateFieldSet(this, _FileFromPath_start, input.start || 0, "f");
|
||||
this.name = (0,external_path_.basename)(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
|
||||
this.size = input.size;
|
||||
this.lastModified = input.lastModified;
|
||||
}
|
||||
slice(start, end) {
|
||||
return new FileFromPath({
|
||||
path: __classPrivateFieldGet(this, _FileFromPath_path, "f"),
|
||||
lastModified: this.lastModified,
|
||||
size: end - start,
|
||||
start
|
||||
});
|
||||
}
|
||||
async *stream() {
|
||||
const { mtimeMs } = await external_fs_.promises.stat(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
|
||||
if (mtimeMs > this.lastModified) {
|
||||
throw new node_domexception(MESSAGE, "NotReadableError");
|
||||
}
|
||||
if (this.size) {
|
||||
yield* (0,external_fs_.createReadStream)(__classPrivateFieldGet(this, _FileFromPath_path, "f"), {
|
||||
start: __classPrivateFieldGet(this, _FileFromPath_start, "f"),
|
||||
end: __classPrivateFieldGet(this, _FileFromPath_start, "f") + this.size - 1
|
||||
});
|
||||
}
|
||||
}
|
||||
get [(_FileFromPath_path = new WeakMap(), _FileFromPath_start = new WeakMap(), Symbol.toStringTag)]() {
|
||||
return "File";
|
||||
}
|
||||
}
|
||||
function createFileFromPath(path, { mtimeMs, size }, filenameOrOptions, options = {}) {
|
||||
let filename;
|
||||
if (esm_isPlainObject(filenameOrOptions)) {
|
||||
[options, filename] = [filenameOrOptions, undefined];
|
||||
}
|
||||
else {
|
||||
filename = filenameOrOptions;
|
||||
}
|
||||
const file = new FileFromPath({ path, size, lastModified: mtimeMs });
|
||||
if (!filename) {
|
||||
filename = file.name;
|
||||
}
|
||||
return new File/* File */.Z([file], filename, {
|
||||
...options, lastModified: file.lastModified
|
||||
});
|
||||
}
|
||||
function fileFromPathSync(path, filenameOrOptions, options = {}) {
|
||||
const stats = statSync(path);
|
||||
return createFileFromPath(path, stats, filenameOrOptions, options);
|
||||
}
|
||||
async function fileFromPath(path, filenameOrOptions, options) {
|
||||
const stats = await external_fs_.promises.stat(path);
|
||||
return createFileFromPath(path, stats, filenameOrOptions, options);
|
||||
}
|
||||
|
||||
|
||||
/***/ })
|
||||
|
||||
};
|
||||
;
|
||||
//# sourceMappingURL=401.main_node.js.map
|
||||
1
packages/kbot/dist/401.main_node.js.LICENSE.txt
vendored
Normal file
1
packages/kbot/dist/401.main_node.js.LICENSE.txt
vendored
Normal file
@ -0,0 +1 @@
|
||||
/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||
1
packages/kbot/dist/401.main_node.js.map
vendored
Normal file
1
packages/kbot/dist/401.main_node.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
212506
packages/kbot/dist/main_node.js
vendored
212506
packages/kbot/dist/main_node.js
vendored
File diff suppressed because one or more lines are too long
118
packages/kbot/dist/main_node.js.LICENSE.txt
vendored
118
packages/kbot/dist/main_node.js.LICENSE.txt
vendored
@ -1,37 +1,3 @@
|
||||
/*!
|
||||
* prr
|
||||
* (c) 2013 Rod Vagg <rod@vagg.org>
|
||||
* https://github.com/rvagg/prr
|
||||
* License: MIT
|
||||
*/
|
||||
|
||||
/*!
|
||||
*
|
||||
* Copyright 2009-2017 Kris Kowal under the terms of the MIT
|
||||
* license found at https://github.com/kriskowal/q/blob/v1/LICENSE
|
||||
*
|
||||
* With parts by Tyler Close
|
||||
* Copyright 2007-2009 Tyler Close under the terms of the MIT X license found
|
||||
* at http://www.opensource.org/licenses/mit-license.html
|
||||
* Forked at ref_send.js version: 2009-05-11
|
||||
*
|
||||
* With parts by Mark Miller
|
||||
* Copyright (C) 2011 Google Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
*/
|
||||
|
||||
/*!
|
||||
* Tmp
|
||||
*
|
||||
@ -40,13 +6,6 @@
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/*!
|
||||
* fill-range <https://github.com/jonschlinkert/fill-range>
|
||||
*
|
||||
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* glob-base <https://github.com/jonschlinkert/glob-base>
|
||||
*
|
||||
@ -60,48 +19,6 @@
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-dotfile <https://github.com/jonschlinkert/is-dotfile>
|
||||
*
|
||||
* Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||||
*
|
||||
* Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* is-number <https://github.com/jonschlinkert/is-number>
|
||||
*
|
||||
* Copyright (c) 2014-present, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* mime-db
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
@ -116,33 +33,24 @@
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
/*!
|
||||
* parse-glob <https://github.com/jonschlinkert/parse-glob>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
/*!
|
||||
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
||||
*
|
||||
* Copyright (c) 2015-present, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
/*! Based on fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> & David Frank */
|
||||
|
||||
/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||||
|
||||
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||||
|
||||
/*! showdown v 2.1.0 - 21-04-2022 */
|
||||
/**
|
||||
* @fileoverview Main entrypoint for libraries using yargs-parser in Node.js
|
||||
* CJS and ESM environments.
|
||||
*
|
||||
* @license
|
||||
* Copyright (c) 2016, Contributors
|
||||
* SPDX-License-Identifier: ISC
|
||||
*/
|
||||
|
||||
/*!*/
|
||||
/**
|
||||
* @license
|
||||
* Copyright (c) 2016, Contributors
|
||||
* SPDX-License-Identifier: ISC
|
||||
*/
|
||||
|
||||
/**
|
||||
* @license
|
||||
|
||||
1
packages/kbot/dist/main_node.js.map
vendored
Normal file
1
packages/kbot/dist/main_node.js.map
vendored
Normal file
File diff suppressed because one or more lines are too long
7
packages/kbot/scripts/todos.md
Normal file
7
packages/kbot/scripts/todos.md
Normal file
@ -0,0 +1,7 @@
|
||||
## Todos
|
||||
|
||||
skip marked todos
|
||||
|
||||
- [ ] updated webpack.config.js for Typescript ESM (error: file is being treated as an ES module because it has a '.js' file extension and ...)
|
||||
- [ ] dont read more files, just fix the config
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
kbotd modify \
|
||||
--path=. \
|
||||
--prompt="./.kbot/todos.md" \
|
||||
--prompt="./scripts/todos.md" \
|
||||
--router2=openai \
|
||||
--model2=gpt-4o \
|
||||
--include="src/commands/run.ts" \
|
||||
--include="src/zod_schema.ts" \
|
||||
--include="src/client.ts" \
|
||||
--model=anthropic/claude-3.7-sonnet \
|
||||
--include="./webpack.config.js" \
|
||||
--include="./package.json" \
|
||||
--include="./tsconfig.json" \
|
||||
--disable="npm,terminal,git,user,search,email" \
|
||||
--dst="./.kbot/todos-log.md"
|
||||
|
||||
@ -17,8 +17,10 @@ export interface CachedModels {
|
||||
timestamp: number;
|
||||
models: OpenAIModel[];
|
||||
}
|
||||
|
||||
export const CACHE_PATH = path.resolve(path.join(path.parse(import.meta.filename).dir, 'data', 'openai_models.json'))
|
||||
import { fileURLToPath } from 'node:url';
|
||||
//export const CACHE_PATH = path.resolve(path.join(path.parse(__filename).dir), 'data', 'openrouter_models.json')
|
||||
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
export const CACHE_PATH = path.resolve(path.join(__dirname, 'data', 'openai_models.json'))
|
||||
|
||||
const CACHE_DURATION = 24 * 60 * 60 * 1000
|
||||
|
||||
|
||||
@ -33,9 +33,10 @@ export interface CachedModels {
|
||||
timestamp: number;
|
||||
models: OpenRouterModel[];
|
||||
}
|
||||
|
||||
import { fileURLToPath } from 'url';
|
||||
//export const CACHE_PATH = path.resolve(path.join(path.parse(__filename).dir), 'data', 'openrouter_models.json')
|
||||
export const CACHE_PATH = path.resolve(path.join(path.parse(import.meta.filename).dir, 'data', 'openrouter_models.json'))
|
||||
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
export const CACHE_PATH = path.resolve(path.join(__dirname, 'data', 'openrouter_models.json'))
|
||||
const CACHE_DURATION = 24 * 60 * 60 * 1000; // 24 hours in milliseconds
|
||||
|
||||
export const readFromCache = (cachePath: string = CACHE_PATH): Promise<OpenRouterModel[] | null> => {
|
||||
|
||||
33
packages/kbot/webpack.config.js
Normal file
33
packages/kbot/webpack.config.js
Normal file
@ -0,0 +1,33 @@
|
||||
import path from 'path';
|
||||
import { fileURLToPath } from 'url';
|
||||
import webpack from 'webpack';
|
||||
|
||||
const __dirname = fileURLToPath(new URL('.', import.meta.url));
|
||||
|
||||
export default {
|
||||
devtool: 'source-map',
|
||||
plugins: [
|
||||
new webpack.BannerPlugin({ banner: "#!/usr/bin/env node", raw: true })
|
||||
],
|
||||
entry: './dist-in/main.js',
|
||||
target: 'node',
|
||||
mode: 'production',
|
||||
module: {
|
||||
rules: []
|
||||
},
|
||||
optimization: {
|
||||
minimize: false
|
||||
},
|
||||
resolve: {
|
||||
extensions: ['.js', '.ts']
|
||||
},
|
||||
output: {
|
||||
filename: 'main_node.js',
|
||||
path: path.resolve(__dirname, 'dist')
|
||||
},
|
||||
externals: {
|
||||
'typescript': 'commonjs typescript',
|
||||
puppeteer: "require('puppeteer')",
|
||||
"node-emoji" : "require('node-emoji')"
|
||||
}
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user