maintainence love:)

This commit is contained in:
2025-03-18 23:13:43 +01:00
parent a344fc62d6
commit 3dcebc0210
11 changed files with 2359 additions and 493 deletions
+3 -2
View File
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.LOGGING_DIRECTORY = exports.PREFERENCES_FILE_NAME = exports.API_PREFIX = exports.MAX_FILE_SIZE = exports.EXCLUDE_GLOB = exports.MODULE_NAME = void 0;
exports.LOGGING_DIRECTORY = exports.PREFERENCES_FILE_NAME = exports.API_PREFIX = exports.MAX_FILE_SIZE_ASSISTANT = exports.MAX_FILE_SIZE = exports.EXCLUDE_GLOB = exports.MODULE_NAME = void 0;
exports.MODULE_NAME = 'kbot';
exports.EXCLUDE_GLOB = [
"**/node_modules/**",
@@ -12,7 +12,8 @@ exports.EXCLUDE_GLOB = [
".git"
];
exports.MAX_FILE_SIZE = 1024 * 1024 * 2;
exports.MAX_FILE_SIZE_ASSISTANT = 1024 * 1024 * 10;
exports.API_PREFIX = 'osr';
exports.PREFERENCES_FILE_NAME = 'preferences.md';
exports.LOGGING_DIRECTORY = `.${exports.MODULE_NAME}`;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLFdBQVcsR0FBRyxNQUFNLENBQUE7QUFDcEIsUUFBQSxZQUFZLEdBQUc7SUFDeEIsb0JBQW9CO0lBQ3BCLFlBQVk7SUFDWixhQUFhO0lBQ2IsZ0JBQWdCO0lBQ2hCLE9BQU87SUFDUCxJQUFJLG1CQUFXLEVBQUU7SUFDakIsTUFBTTtDQUNULENBQUE7QUFDWSxRQUFBLGFBQWEsR0FBRyxJQUFJLEdBQUcsSUFBSSxHQUFHLENBQUMsQ0FBQTtBQUMvQixRQUFBLFVBQVUsR0FBRyxLQUFLLENBQUE7QUFDbEIsUUFBQSxxQkFBcUIsR0FBRyxnQkFBZ0IsQ0FBQTtBQUN4QyxRQUFBLGlCQUFpQixHQUFHLElBQUksbUJBQVcsRUFBRSxDQUFBIn0=
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY29uc3RhbnRzLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsic3JjL2NvbnN0YW50cy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7QUFBYSxRQUFBLFdBQVcsR0FBRyxNQUFNLENBQUE7QUFDcEIsUUFBQSxZQUFZLEdBQUc7SUFDeEIsb0JBQW9CO0lBQ3BCLFlBQVk7SUFDWixhQUFhO0lBQ2IsZ0JBQWdCO0lBQ2hCLE9BQU87SUFDUCxJQUFJLG1CQUFXLEVBQUU7SUFDakIsTUFBTTtDQUNULENBQUE7QUFDWSxRQUFBLGFBQWEsR0FBRyxJQUFJLEdBQUcsSUFBSSxHQUFHLENBQUMsQ0FBQTtBQUMvQixRQUFBLHVCQUF1QixHQUFHLElBQUksR0FBRyxJQUFJLEdBQUcsRUFBRSxDQUFBO0FBQzFDLFFBQUEsVUFBVSxHQUFHLEtBQUssQ0FBQTtBQUNsQixRQUFBLHFCQUFxQixHQUFHLGdCQUFnQixDQUFBO0FBQ3hDLFFBQUEsaUJBQWlCLEdBQUcsSUFBSSxtQkFBVyxFQUFFLENBQUEifQ==
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -1,16 +1,10 @@
{
"timestamp": 1741289147103,
"timestamp": 1742336018639,
"models": [
{
"id": "gpt-4.5-preview",
"id": "gpt-4o-2024-11-20",
"object": "model",
"created": 1740623059,
"owned_by": "system"
},
{
"id": "gpt-4.5-preview-2025-02-27",
"object": "model",
"created": 1740623304,
"created": 1739331543,
"owned_by": "system"
},
{
@@ -43,18 +37,6 @@
"created": 1727460443,
"owned_by": "system"
},
{
"id": "gpt-4o-mini-realtime-preview-2024-12-17",
"object": "model",
"created": 1734112601,
"owned_by": "system"
},
{
"id": "gpt-4o-mini-realtime-preview",
"object": "model",
"created": 1734387380,
"owned_by": "system"
},
{
"id": "o1-mini-2024-09-12",
"object": "model",
@@ -67,24 +49,18 @@
"created": 1725649008,
"owned_by": "system"
},
{
"id": "gpt-4o-mini-audio-preview",
"object": "model",
"created": 1734387424,
"owned_by": "system"
},
{
"id": "whisper-1",
"object": "model",
"created": 1677532384,
"owned_by": "openai-internal"
},
{
"id": "omni-moderation-latest",
"object": "model",
"created": 1731689265,
"owned_by": "system"
},
{
"id": "gpt-4o-mini-audio-preview",
"object": "model",
"created": 1734387424,
"owned_by": "system"
},
{
"id": "omni-moderation-2024-09-26",
"object": "model",
@@ -103,24 +79,18 @@
"created": 1692634615,
"owned_by": "system"
},
{
"id": "chatgpt-4o-latest",
"object": "model",
"created": 1723515131,
"owned_by": "system"
},
{
"id": "gpt-4o-2024-11-20",
"object": "model",
"created": 1739331543,
"owned_by": "system"
},
{
"id": "tts-1-hd-1106",
"object": "model",
"created": 1699053533,
"owned_by": "system"
},
{
"id": "whisper-1",
"object": "model",
"created": 1677532384,
"owned_by": "openai-internal"
},
{
"id": "text-embedding-3-large",
"object": "model",
@@ -140,9 +110,9 @@
"owned_by": "openai"
},
{
"id": "o3-mini-2025-01-31",
"id": "gpt-4o-2024-05-13",
"object": "model",
"created": 1738010200,
"created": 1715368132,
"owned_by": "system"
},
{
@@ -151,12 +121,6 @@
"created": 1699046015,
"owned_by": "system"
},
{
"id": "o3-mini",
"object": "model",
"created": 1737146383,
"owned_by": "system"
},
{
"id": "o1-preview",
"object": "model",
@@ -169,12 +133,6 @@
"created": 1725648865,
"owned_by": "system"
},
{
"id": "gpt-4o-2024-08-06",
"object": "model",
"created": 1722814719,
"owned_by": "system"
},
{
"id": "gpt-3.5-turbo-instruct-0914",
"object": "model",
@@ -182,16 +140,22 @@
"owned_by": "system"
},
{
"id": "gpt-4o",
"id": "gpt-4o-mini",
"object": "model",
"created": 1715367049,
"created": 1721172741,
"owned_by": "system"
},
{
"id": "tts-1",
"id": "gpt-4o-mini-search-preview",
"object": "model",
"created": 1681940951,
"owned_by": "openai-internal"
"created": 1741391161,
"owned_by": "system"
},
{
"id": "gpt-4o-mini-2024-07-18",
"object": "model",
"created": 1721172717,
"owned_by": "system"
},
{
"id": "tts-1-1106",
@@ -211,6 +175,12 @@
"created": 1698959748,
"owned_by": "system"
},
{
"id": "gpt-4o-search-preview",
"object": "model",
"created": 1741388720,
"owned_by": "system"
},
{
"id": "gpt-4-turbo",
"object": "model",
@@ -224,21 +194,15 @@
"owned_by": "system"
},
{
"id": "gpt-4o-2024-05-13",
"id": "gpt-4o-mini-search-preview-2025-03-11",
"object": "model",
"created": 1715368132,
"created": 1741390858,
"owned_by": "system"
},
{
"id": "o1-2024-12-17",
"id": "chatgpt-4o-latest",
"object": "model",
"created": 1734326976,
"owned_by": "system"
},
{
"id": "o1",
"object": "model",
"created": 1734375816,
"created": 1723515131,
"owned_by": "system"
},
{
@@ -248,9 +212,9 @@
"owned_by": "system"
},
{
"id": "gpt-4o-realtime-preview-2024-12-17",
"id": "gpt-4o-2024-08-06",
"object": "model",
"created": 1733945430,
"created": 1722814719,
"owned_by": "system"
},
{
@@ -278,15 +242,9 @@
"owned_by": "openai-internal"
},
{
"id": "gpt-4o-mini-2024-07-18",
"id": "gpt-4o",
"object": "model",
"created": 1721172717,
"owned_by": "system"
},
{
"id": "gpt-4o-mini",
"object": "model",
"created": 1721172741,
"created": 1715367049,
"owned_by": "system"
},
{
@@ -314,16 +272,82 @@
"owned_by": "openai"
},
{
"id": "gpt-4-0125-preview",
"id": "o1-2024-12-17",
"object": "model",
"created": 1706037612,
"created": 1734326976,
"owned_by": "system"
},
{
"id": "gpt-4.5-preview",
"object": "model",
"created": 1740623059,
"owned_by": "system"
},
{
"id": "gpt-4o-mini-realtime-preview",
"object": "model",
"created": 1734387380,
"owned_by": "system"
},
{
"id": "gpt-4.5-preview-2025-02-27",
"object": "model",
"created": 1740623304,
"owned_by": "system"
},
{
"id": "gpt-4o-mini-realtime-preview-2024-12-17",
"object": "model",
"created": 1734112601,
"owned_by": "system"
},
{
"id": "gpt-4o-search-preview-2025-03-11",
"object": "model",
"created": 1741388170,
"owned_by": "system"
},
{
"id": "tts-1",
"object": "model",
"created": 1681940951,
"owned_by": "openai-internal"
},
{
"id": "gpt-4-turbo-preview",
"object": "model",
"created": 1706037777,
"owned_by": "system"
},
{
"id": "gpt-4-0125-preview",
"object": "model",
"created": 1706037612,
"owned_by": "system"
},
{
"id": "o3-mini",
"object": "model",
"created": 1737146383,
"owned_by": "system"
},
{
"id": "o1",
"object": "model",
"created": 1734375816,
"owned_by": "system"
},
{
"id": "o3-mini-2025-01-31",
"object": "model",
"created": 1738010200,
"owned_by": "system"
},
{
"id": "gpt-4o-realtime-preview-2024-12-17",
"object": "model",
"created": 1733945430,
"owned_by": "system"
}
]
}
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
View File
@@ -9,6 +9,7 @@ export const EXCLUDE_GLOB = [
".git"
]
export const MAX_FILE_SIZE = 1024 * 1024 * 2
export const MAX_FILE_SIZE_ASSISTANT = 1024 * 1024 * 10
export const API_PREFIX = 'osr'
export const PREFERENCES_FILE_NAME = 'preferences.md'
export const LOGGING_DIRECTORY = `.${MODULE_NAME}`
+3 -4
View File
@@ -9,15 +9,14 @@ import { isFile, forward_slash } from '@plastichub/osr-commons'
import { logger } from './index'
import { lookup } from 'mime-types'
import { globSync } from 'glob'
import { EXCLUDE_GLOB, MAX_FILE_SIZE } from './constants'
import { EXCLUDE_GLOB, MAX_FILE_SIZE, MAX_FILE_SIZE_ASSISTANT } from './constants'
import { defaultMimeRegistry, IHandlerResult } from './mime-handlers'
import { ChatCompletionContentPartImage } from 'openai/resources/index.mjs'
export const default_filters = {
isFile,
exists,
size: (filePath: string) => toNode(filePath).size < MAX_FILE_SIZE,
size: (filePath: string) => toNode(filePath).size < MAX_FILE_SIZE_ASSISTANT,
};
const isPathInside = (childPath: string, parentPath: string): boolean => {
@@ -95,7 +94,7 @@ export const glob = (
]))
let files = allFiles.filter((f) =>
Object.keys(default_filters).every((key) => default_filters[key](f))
Object.keys(filters).every((key) => default_filters[key](f))
)
return files
}
+38 -5
View File
@@ -27,11 +27,14 @@ export interface IKBotOptions {
aetherwiing/mn-starcannon-12b | paid
ai21/jamba-1-5-large | paid
ai21/jamba-1-5-mini | paid
ai21/jamba-1.6-large | paid
ai21/jamba-instruct | paid
ai21/jamba-1.6-mini | paid
aion-labs/aion-1.0 | paid
aion-labs/aion-1.0-mini | paid
aion-labs/aion-rp-llama-3.1-8b | paid
jondurbin/airoboros-l2-70b | paid
allenai/olmo-2-0325-32b-instruct | paid
amazon/nova-lite-v1 | paid
amazon/nova-micro-v1 | paid
amazon/nova-pro-v1 | paid
@@ -60,6 +63,7 @@ export interface IKBotOptions {
anthropic/claude-2.1:beta | paid
openrouter/auto | paid
cohere/command | paid
cohere/command-a | paid
cohere/command-r | paid
cohere/command-r-03-2024 | paid
cohere/command-r-08-2024 | paid
@@ -67,7 +71,6 @@ export interface IKBotOptions {
cohere/command-r-plus-04-2024 | paid
cohere/command-r-plus-08-2024 | paid
cohere/command-r7b-12-2024 | paid
databricks/dbrx-instruct | paid
deepseek/deepseek-r1-zero:free | free
deepseek/deepseek-chat | paid
deepseek/deepseek-chat:free | free
@@ -78,7 +81,9 @@ export interface IKBotOptions {
deepseek/deepseek-r1-distill-llama-8b | paid
deepseek/deepseek-r1-distill-qwen-1.5b | paid
deepseek/deepseek-r1-distill-qwen-14b | paid
deepseek/deepseek-r1-distill-qwen-14b:free | free
deepseek/deepseek-r1-distill-qwen-32b | paid
deepseek/deepseek-r1-distill-qwen-32b:free | free
cognitivecomputations/dolphin-mixtral-8x7b | paid
cognitivecomputations/dolphin-mixtral-8x22b | paid
cognitivecomputations/dolphin3.0-mistral-24b:free | free
@@ -105,6 +110,11 @@ export interface IKBotOptions {
google/gemma-2-27b-it | paid
google/gemma-2-9b-it | paid
google/gemma-2-9b-it:free | free
google/gemma-3-12b-it:free | free
google/gemma-3-1b-it:free | free
google/gemma-3-27b-it | paid
google/gemma-3-27b-it:free | free
google/gemma-3-4b-it:free | free
google/gemma-7b-it | paid
google/learnlm-1.5-pro-experimental:free | free
google/palm-2-chat-bison | paid
@@ -115,6 +125,7 @@ export interface IKBotOptions {
infermatic/mn-inferor-12b | paid
inflection/inflection-3-pi | paid
inflection/inflection-3-productivity | paid
latitudegames/wayfarer-large-70b-llama-3.3 | paid
liquid/lfm-3b | paid
liquid/lfm-40b | paid
liquid/lfm-7b | paid
@@ -139,11 +150,13 @@ export interface IKBotOptions {
meta-llama/llama-3.2-1b-instruct | paid
meta-llama/llama-3.2-1b-instruct:free | free
meta-llama/llama-3.2-3b-instruct | paid
meta-llama/llama-3.2-3b-instruct:free | free
meta-llama/llama-3.2-90b-vision-instruct | paid
meta-llama/llama-3.3-70b-instruct | paid
meta-llama/llama-3.3-70b-instruct:free | free
meta-llama/llama-guard-2-8b | paid
microsoft/phi-4 | paid
microsoft/phi-4-multimodal-instruct | paid
microsoft/phi-3-medium-128k-instruct | paid
microsoft/phi-3-medium-128k-instruct:free | free
microsoft/phi-3-mini-128k-instruct | paid
@@ -165,11 +178,13 @@ export interface IKBotOptions {
mistralai/mistral-7b-instruct | paid
mistralai/mistral-7b-instruct:free | free
mistralai/mistral-7b-instruct-v0.1 | paid
mistralai/mistral-7b-instruct-v0.2 | paid
mistralai/mistral-7b-instruct-v0.3 | paid
mistralai/mistral-nemo | paid
mistralai/mistral-nemo:free | free
mistralai/mistral-small-24b-instruct-2501 | paid
mistralai/mistral-small-24b-instruct-2501:free | free
mistralai/mistral-small-3.1-24b-instruct | paid
mistralai/mixtral-8x22b-instruct | paid
mistralai/mixtral-8x7b | paid
mistralai/mixtral-8x7b-instruct | paid
@@ -193,6 +208,8 @@ export interface IKBotOptions {
nousresearch/hermes-2-pro-llama-3-8b | paid
nvidia/llama-3.1-nemotron-70b-instruct | paid
nvidia/llama-3.1-nemotron-70b-instruct:free | free
open-r1/olympiccoder-32b:free | free
open-r1/olympiccoder-7b:free | free
openai/chatgpt-4o-latest | paid
openai/gpt-3.5-turbo | paid
openai/gpt-3.5-turbo-0613 | paid
@@ -213,8 +230,10 @@ export interface IKBotOptions {
openai/gpt-4o-2024-08-06 | paid
openai/gpt-4o-2024-11-20 | paid
openai/gpt-4o:extended | paid
openai/gpt-4o-search-preview | paid
openai/gpt-4o-mini | paid
openai/gpt-4o-mini-2024-07-18 | paid
openai/gpt-4o-mini-search-preview | paid
openai/o1 | paid
openai/o1-mini | paid
openai/o1-mini-2024-09-12 | paid
@@ -231,28 +250,34 @@ export interface IKBotOptions {
perplexity/llama-3.1-sonar-small-128k-online | paid
perplexity/r1-1776 | paid
perplexity/sonar | paid
perplexity/sonar-deep-research | paid
perplexity/sonar-pro | paid
perplexity/sonar-reasoning | paid
perplexity/sonar-reasoning-pro | paid
pygmalionai/mythalion-13b | paid
qwen/qwen-2-72b-instruct | paid
qwen/qwen-2-7b-instruct | paid
qwen/qwen-2-7b-instruct:free | free
qwen/qvq-72b-preview | paid
qwen/qwen-vl-plus:free | free
qwen/qwen-vl-max | paid
qwen/qwen-vl-plus | paid
qwen/qwen-max | paid
qwen/qwen-plus | paid
qwen/qwen-turbo | paid
qwen/qwen2.5-32b-instruct | paid
qwen/qwen2.5-vl-72b-instruct | paid
qwen/qwen2.5-vl-72b-instruct:free | free
qwen/qwen-2.5-vl-72b-instruct | paid
qwen/qwen-2.5-vl-7b-instruct | paid
qwen/qwq-32b | paid
qwen/qwq-32b:free | free
qwen/qwq-32b-preview | paid
qwen/qwen-2-vl-72b-instruct | paid
qwen/qwen-2-vl-7b-instruct | paid
qwen/qwq-32b-preview:free | free
qwen/qwen-2.5-72b-instruct | paid
qwen/qwen-2.5-72b-instruct:free | free
qwen/qwen-2.5-7b-instruct | paid
qwen/qwen-2.5-coder-32b-instruct | paid
qwen/qwen-2.5-coder-32b-instruct:free | free
rekaai/reka-flash-3:free | free
undi95/remm-slerp-l2-13b | paid
thedrummer/rocinante-12b | paid
sophosympatheia/rogue-rose-103b-v0.2:free | free
@@ -262,6 +287,10 @@ export interface IKBotOptions {
sao10k/l3.1-euryale-70b | paid
sao10k/l3.3-euryale-70b | paid
raifle/sorcererlm-8x22b | paid
steelskull/l3.3-electra-r1-70b | paid
tokyotech-llm/llama-3.1-swallow-70b-instruct-v0.3 | paid
thedrummer/anubis-pro-105b-v1 | paid
thedrummer/skyfall-36b-v2 | paid
undi95/toppy-m-7b | paid
undi95/toppy-m-7b:free | free
thedrummer/unslopnemo-12b | paid
@@ -308,9 +337,13 @@ export interface IKBotOptions {
gpt-4o-mini-audio-preview-2024-12-17
gpt-4o-mini-realtime-preview
gpt-4o-mini-realtime-preview-2024-12-17
gpt-4o-mini-search-preview
gpt-4o-mini-search-preview-2025-03-11
gpt-4o-realtime-preview
gpt-4o-realtime-preview-2024-10-01
gpt-4o-realtime-preview-2024-12-17
gpt-4o-search-preview
gpt-4o-search-preview-2025-03-11
o1
o1-2024-12-17
o1-mini