Skip to content

Commit fc0fca5

Browse files
authored
feat: version 3.0 (#105)
2 parents 51265c8 + 8565b7c commit fc0fca5

File tree

597 files changed

+73617
-12460
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

597 files changed

+73617
-12460
lines changed

.config/typedoc.css

+2-2
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,8 @@ h6:not(.tsd-anchor-link, .tsd-returns-title) > a:hover:before {
214214
margin-top: 16px;
215215
}
216216

217-
img[src$="assets/logo.roundEdges.png"],
218-
img[src$="assets/logo.png"] {
217+
img[src$="assets/logo.v3.roundEdges.png"],
218+
img[src$="assets/logo.v3.png"] {
219219
box-shadow: 0px 4px 12px 0px rgb(0 0 0 / 16%), 0px 8px 64px 0px rgb(0 0 0 / 24%);
220220
border-radius: 14px;
221221
}

.config/typedoc.json

+13-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://typedoc.org/schema.json",
3-
"entryPoints": ["../src/index.ts"],
3+
"entryPoints": ["../src/apiDocsIndex.ts"],
44
"out": "../docs/api",
55
"tsconfig": "../tsconfig.json",
66
"customCss": "./typedoc.css",
@@ -11,12 +11,22 @@
1111
"githubPages": true,
1212
"hideGenerator": true,
1313
"jsDocCompatibility": true,
14-
"htmlLang": "en",
14+
"lang": "en",
1515
"plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme", "typedoc-plugin-mdn-links"],
1616
"hideBreadcrumbs": true,
1717
"hidePageHeader": true,
1818
"preserveAnchorCasing": true,
1919
"useCodeBlocks": true,
2020
"expandObjects": true,
21-
"parametersFormat": "table"
21+
"expandParameters": true,
22+
"parametersFormat": "table",
23+
"propertiesFormat": "list",
24+
"enumMembersFormat": "table",
25+
"typeDeclarationFormat": "list",
26+
"classPropertiesFormat": "list",
27+
"interfacePropertiesFormat": "list",
28+
"sort": ["source-order"],
29+
"docsRoot": "../docs",
30+
"intentionallyNotExported": ["MergeOptionalUnionTypes", "GbnfJsonSchemaToTSType", "_LlamaText"],
31+
"useHTMLEncodedBrackets": true
2232
}

.editorconfig

-3
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,5 @@ insert_final_newline = true
1010
[{package.json,package-lock.json,manifest.json}]
1111
indent_size = 2
1212

13-
[.babelrc]
14-
indent_size = 2
15-
1613
[*.yml]
1714
indent_size = 2

.eslintrc.json

+57-22
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,73 @@
55
"browser": false,
66
"es6": true
77
},
8-
"ignorePatterns": ["/dist", "/llama", "/docs-site"],
8+
"ignorePatterns": [
9+
"/dist",
10+
"/llama",
11+
"/docs-site",
12+
"/packages/create-node-llama-cpp/dist",
13+
"/packages/@node-llama-cpp/*/dist"
14+
],
915
"extends": [
10-
"eslint:recommended"
16+
"eslint:recommended",
17+
"plugin:jsdoc/recommended"
1118
],
1219
"globals": {
1320
"Atomics": "readonly",
1421
"SharedArrayBuffer": "readonly"
1522
},
1623
"parserOptions": {
17-
"ecmaFeatures": {
18-
"jsx": true
19-
},
20-
"ecmaVersion": 2021,
24+
"ecmaVersion": 2023,
2125
"sourceType": "module"
2226
},
2327
"overrides": [{
2428
"files": ["**.ts"],
2529
"extends": [
2630
"eslint:recommended",
27-
"plugin:@typescript-eslint/recommended"
31+
"plugin:@typescript-eslint/recommended",
32+
"plugin:jsdoc/recommended-typescript"
2833
],
2934
"parser": "@typescript-eslint/parser",
3035
"plugins": [
3136
"@typescript-eslint",
3237
"import",
33-
"node"
38+
"jsdoc",
39+
"n"
3440
],
3541
"rules": {
3642
"@typescript-eslint/explicit-module-boundary-types": ["off"],
3743
"@typescript-eslint/ban-ts-comment": ["off"],
3844
"@typescript-eslint/no-explicit-any": ["off"],
3945
"semi": ["off"],
4046
"@typescript-eslint/semi": ["warn", "always"],
41-
"@typescript-eslint/no-inferrable-types": ["off"]
47+
"@typescript-eslint/no-inferrable-types": ["off"],
48+
"@typescript-eslint/member-ordering": ["warn", {
49+
"default": ["field", "constructor", "method", "signature"],
50+
"typeLiterals": []
51+
}],
52+
"@typescript-eslint/parameter-properties": ["warn", {
53+
"allow": []
54+
}],
55+
"@typescript-eslint/explicit-member-accessibility": ["warn"],
56+
"@typescript-eslint/member-delimiter-style": ["warn", {
57+
"multiline": {
58+
"delimiter": "comma",
59+
"requireLast": false
60+
},
61+
"singleline": {
62+
"delimiter": "comma",
63+
"requireLast": false
64+
},
65+
"multilineDetection": "brackets"
66+
}],
67+
"jsdoc/require-param": ["off"],
68+
"jsdoc/check-param-names": ["warn", {
69+
"checkDestructured": false
70+
}],
71+
"jsdoc/require-returns": ["off"],
72+
"jsdoc/require-jsdoc": ["off"],
73+
"jsdoc/require-yields": ["off"],
74+
"jsdoc/require-param-description": ["off"]
4275
}
4376
}, {
4477
"files": ["test/**/**.ts"],
@@ -49,11 +82,18 @@
4982
"plugins": [
5083
"@typescript-eslint",
5184
"import",
52-
"node"
85+
"jsdoc",
86+
"n"
5387
],
5488
"settings": {
5589
"import/parsers": {
5690
"@typescript-eslint/parser": [".ts"]
91+
},
92+
"jsdoc": {
93+
"exemptDestructuredRootsFromChecks": true,
94+
"tagNamePreference": {
95+
"hidden": "hidden"
96+
}
5797
}
5898
},
5999
"rules": {
@@ -90,9 +130,7 @@
90130
"groups": ["builtin", "external","internal", "parent", "sibling", "index", "type", "object", "unknown"],
91131
"warnOnUnassignedImports": true
92132
}],
93-
"node/file-extension-in-import": ["error", "always", {
94-
"tryExtensions": [".js", ".json"]
95-
}],
133+
"n/file-extension-in-import": ["error", "always"],
96134
"newline-per-chained-call": ["error", {
97135
"ignoreChainWithDepth": 2
98136
}],
@@ -101,26 +139,23 @@
101139
"no-duplicate-imports": ["error", {
102140
"includeExports": true
103141
}],
104-
"camelcase": ["warn"],
142+
"camelcase": ["warn", {
143+
"allow": ["\\d+_\\d+"]
144+
}],
105145
"jsx-quotes": ["warn"],
106146
"yoda": ["error", "never", {
107147
"exceptRange": true
108148
}],
109149
"no-eval": ["error"],
110150
"array-callback-return": ["error"],
111-
"valid-jsdoc": ["error", {
112-
"requireParamType": true,
113-
"requireReturnType": true,
114-
"requireReturn": false,
115-
"requireParamDescription": false,
116-
"requireReturnDescription": false
117-
}],
118151
"no-empty": ["error", {
119152
"allowEmptyCatch": true
120153
}],
121154
"keyword-spacing": ["warn"],
122155
"space-infix-ops": ["warn"],
123-
"spaced-comment": ["warn", "always"],
156+
"spaced-comment": ["warn", "always", {
157+
"markers": ["/"]
158+
}],
124159
"eol-last": ["warn", "always"],
125160
"max-len": ["warn", {
126161
"code": 140,

.github/FUNDING.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# These are supported funding model platforms
22

3-
github: [giladgd, ido-pluto]
3+
github: giladgd
44
patreon: # Replace with a single Patreon username
55
open_collective: # Replace with a single Open Collective username
66
ko_fi: # Replace with a single Ko-fi username

.github/ISSUE_TEMPLATE/bug-report.yml

+9-2
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@ body:
3939
Your bug can be investigated much faster if your code can be run without any dependencies other than `node-llama-cpp`.
4040
Issues without reproduction steps or code examples may be closed as not actionable.
4141
Please try to provide a Minimal, Complete, and Verifiable example ([link](http://stackoverflow.com/help/mcve)).
42+
Please include a link to the model file you used if possible.
43+
Also, please enable enable debug logs by using `getLlama({debug: true})` to get more information.
4244
placeholder: >-
4345
Please try to provide a Minimal, Complete, and Verifiable example.
4446
http://stackoverflow.com/help/mcve
@@ -49,7 +51,8 @@ body:
4951
attributes:
5052
label: My Environment
5153
description: >-
52-
Please add any other relevant dependencies to this table at the end.
54+
Please include the result of the command `npx --yes node-llama-cpp inspect gpu`.
55+
Please also add any other relevant dependencies to this table at the end.
5356
For example: Electron, Bun, Webpack.
5457
value: |
5558
| Dependency | Version |
@@ -68,16 +71,20 @@ body:
6871
description: >-
6972
Add any other context about the bug report here.
7073
- type: checkboxes
71-
id: drivers
74+
id: features
7275
attributes:
7376
label: Relevant Features Used
7477
options:
7578
- label: Metal support
7679
required: false
7780
- label: CUDA support
7881
required: false
82+
- label: Vulkan support
83+
required: false
7984
- label: Grammar
8085
required: false
86+
- label: Function calling
87+
required: false
8188
- type: dropdown
8289
id: pr
8390
attributes:

.github/ISSUE_TEMPLATE/config.yml

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
blank_issues_enabled: false
12
contact_links:
23
- name: 🤔 Questions, General Support, and Help
34
url: https://github.com/withcatai/node-llama-cpp/discussions

.github/ISSUE_TEMPLATE/feature-request.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ body:
4343
label: Additional Context
4444
description: Add any other context about the feature request here
4545
- type: checkboxes
46-
id: drivers
46+
id: features
4747
attributes:
4848
label: Related Features to This Feature Request
4949
options:

0 commit comments

Comments
 (0)