Skip to content

Commit

Permalink
feat: version 3.0 (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd authored Sep 23, 2024
2 parents 51265c8 + 8565b7c commit fc0fca5
Show file tree
Hide file tree
Showing 597 changed files with 73,617 additions and 12,460 deletions.
4 changes: 2 additions & 2 deletions .config/typedoc.css
Original file line number Diff line number Diff line change
Expand Up @@ -214,8 +214,8 @@ h6:not(.tsd-anchor-link, .tsd-returns-title) > a:hover:before {
margin-top: 16px;
}

img[src$="assets/logo.roundEdges.png"],
img[src$="assets/logo.png"] {
img[src$="assets/logo.v3.roundEdges.png"],
img[src$="assets/logo.v3.png"] {
box-shadow: 0px 4px 12px 0px rgb(0 0 0 / 16%), 0px 8px 64px 0px rgb(0 0 0 / 24%);
border-radius: 14px;
}
Expand Down
16 changes: 13 additions & 3 deletions .config/typedoc.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://typedoc.org/schema.json",
"entryPoints": ["../src/index.ts"],
"entryPoints": ["../src/apiDocsIndex.ts"],
"out": "../docs/api",
"tsconfig": "../tsconfig.json",
"customCss": "./typedoc.css",
Expand All @@ -11,12 +11,22 @@
"githubPages": true,
"hideGenerator": true,
"jsDocCompatibility": true,
"htmlLang": "en",
"lang": "en",
"plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme", "typedoc-plugin-mdn-links"],
"hideBreadcrumbs": true,
"hidePageHeader": true,
"preserveAnchorCasing": true,
"useCodeBlocks": true,
"expandObjects": true,
"parametersFormat": "table"
"expandParameters": true,
"parametersFormat": "table",
"propertiesFormat": "list",
"enumMembersFormat": "table",
"typeDeclarationFormat": "list",
"classPropertiesFormat": "list",
"interfacePropertiesFormat": "list",
"sort": ["source-order"],
"docsRoot": "../docs",
"intentionallyNotExported": ["MergeOptionalUnionTypes", "GbnfJsonSchemaToTSType", "_LlamaText"],
"useHTMLEncodedBrackets": true
}
3 changes: 0 additions & 3 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,5 @@ insert_final_newline = true
[{package.json,package-lock.json,manifest.json}]
indent_size = 2

[.babelrc]
indent_size = 2

[*.yml]
indent_size = 2
79 changes: 57 additions & 22 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,73 @@
"browser": false,
"es6": true
},
"ignorePatterns": ["/dist", "/llama", "/docs-site"],
"ignorePatterns": [
"/dist",
"/llama",
"/docs-site",
"/packages/create-node-llama-cpp/dist",
"/packages/@node-llama-cpp/*/dist"
],
"extends": [
"eslint:recommended"
"eslint:recommended",
"plugin:jsdoc/recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parserOptions": {
"ecmaFeatures": {
"jsx": true
},
"ecmaVersion": 2021,
"ecmaVersion": 2023,
"sourceType": "module"
},
"overrides": [{
"files": ["**.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended"
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended-typescript"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"import",
"node"
"jsdoc",
"n"
],
"rules": {
"@typescript-eslint/explicit-module-boundary-types": ["off"],
"@typescript-eslint/ban-ts-comment": ["off"],
"@typescript-eslint/no-explicit-any": ["off"],
"semi": ["off"],
"@typescript-eslint/semi": ["warn", "always"],
"@typescript-eslint/no-inferrable-types": ["off"]
"@typescript-eslint/no-inferrable-types": ["off"],
"@typescript-eslint/member-ordering": ["warn", {
"default": ["field", "constructor", "method", "signature"],
"typeLiterals": []
}],
"@typescript-eslint/parameter-properties": ["warn", {
"allow": []
}],
"@typescript-eslint/explicit-member-accessibility": ["warn"],
"@typescript-eslint/member-delimiter-style": ["warn", {
"multiline": {
"delimiter": "comma",
"requireLast": false
},
"singleline": {
"delimiter": "comma",
"requireLast": false
},
"multilineDetection": "brackets"
}],
"jsdoc/require-param": ["off"],
"jsdoc/check-param-names": ["warn", {
"checkDestructured": false
}],
"jsdoc/require-returns": ["off"],
"jsdoc/require-jsdoc": ["off"],
"jsdoc/require-yields": ["off"],
"jsdoc/require-param-description": ["off"]
}
}, {
"files": ["test/**/**.ts"],
Expand All @@ -49,11 +82,18 @@
"plugins": [
"@typescript-eslint",
"import",
"node"
"jsdoc",
"n"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"jsdoc": {
"exemptDestructuredRootsFromChecks": true,
"tagNamePreference": {
"hidden": "hidden"
}
}
},
"rules": {
Expand Down Expand Up @@ -90,9 +130,7 @@
"groups": ["builtin", "external","internal", "parent", "sibling", "index", "type", "object", "unknown"],
"warnOnUnassignedImports": true
}],
"node/file-extension-in-import": ["error", "always", {
"tryExtensions": [".js", ".json"]
}],
"n/file-extension-in-import": ["error", "always"],
"newline-per-chained-call": ["error", {
"ignoreChainWithDepth": 2
}],
Expand All @@ -101,26 +139,23 @@
"no-duplicate-imports": ["error", {
"includeExports": true
}],
"camelcase": ["warn"],
"camelcase": ["warn", {
"allow": ["\\d+_\\d+"]
}],
"jsx-quotes": ["warn"],
"yoda": ["error", "never", {
"exceptRange": true
}],
"no-eval": ["error"],
"array-callback-return": ["error"],
"valid-jsdoc": ["error", {
"requireParamType": true,
"requireReturnType": true,
"requireReturn": false,
"requireParamDescription": false,
"requireReturnDescription": false
}],
"no-empty": ["error", {
"allowEmptyCatch": true
}],
"keyword-spacing": ["warn"],
"space-infix-ops": ["warn"],
"spaced-comment": ["warn", "always"],
"spaced-comment": ["warn", "always", {
"markers": ["/"]
}],
"eol-last": ["warn", "always"],
"max-len": ["warn", {
"code": 140,
Expand Down
2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# These are supported funding model platforms

github: [giladgd, ido-pluto]
github: giladgd
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
Expand Down
11 changes: 9 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ body:
Your bug can be investigated much faster if your code can be run without any dependencies other than `node-llama-cpp`.
Issues without reproduction steps or code examples may be closed as not actionable.
Please try to provide a Minimal, Complete, and Verifiable example ([link](http://stackoverflow.com/help/mcve)).
Please include a link to the model file you used if possible.
Also, please enable enable debug logs by using `getLlama({debug: true})` to get more information.
placeholder: >-
Please try to provide a Minimal, Complete, and Verifiable example.
http://stackoverflow.com/help/mcve
Expand All @@ -49,7 +51,8 @@ body:
attributes:
label: My Environment
description: >-
Please add any other relevant dependencies to this table at the end.
Please include the result of the command `npx --yes node-llama-cpp inspect gpu`.
Please also add any other relevant dependencies to this table at the end.
For example: Electron, Bun, Webpack.
value: |
| Dependency | Version |
Expand All @@ -68,16 +71,20 @@ body:
description: >-
Add any other context about the bug report here.
- type: checkboxes
id: drivers
id: features
attributes:
label: Relevant Features Used
options:
- label: Metal support
required: false
- label: CUDA support
required: false
- label: Vulkan support
required: false
- label: Grammar
required: false
- label: Function calling
required: false
- type: dropdown
id: pr
attributes:
Expand Down
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
blank_issues_enabled: false
contact_links:
- name: 🤔 Questions, General Support, and Help
url: https://github.com/withcatai/node-llama-cpp/discussions
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ body:
label: Additional Context
description: Add any other context about the feature request here
- type: checkboxes
id: drivers
id: features
attributes:
label: Related Features to This Feature Request
options:
Expand Down
Loading

0 comments on commit fc0fca5

Please sign in to comment.