Skip to content

Commit

Permalink
Revert "feat(minor): add more flags to the chat command" (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
giladgd authored Jan 24, 2024
1 parent 1cae987 commit aaca68e
Show file tree
Hide file tree
Showing 96 changed files with 4,485 additions and 11,348 deletions.
4 changes: 1 addition & 3 deletions .config/typedoc.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@
"preserveAnchorCasing": true,
"useCodeBlocks": true,
"expandObjects": true,
"parametersFormat": "table",
"hideInPageTOC": true,
"docsRoot": "../docs"
"parametersFormat": "table"
}
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,8 @@ insert_final_newline = true
[{package.json,package-lock.json,manifest.json}]
indent_size = 2

[.babelrc]
indent_size = 2

[*.yml]
indent_size = 2
39 changes: 15 additions & 24 deletions .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
},
"ignorePatterns": ["/dist", "/llama", "/docs-site"],
"extends": [
"eslint:recommended",
"plugin:jsdoc/recommended"
"eslint:recommended"
],
"globals": {
"Atomics": "readonly",
Expand All @@ -25,31 +24,21 @@
"files": ["**.ts"],
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/recommended",
"plugin:jsdoc/recommended-typescript"
"plugin:@typescript-eslint/recommended"
],
"parser": "@typescript-eslint/parser",
"plugins": [
"@typescript-eslint",
"import",
"jsdoc",
"n"
"node"
],
"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"],
"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"]
"@typescript-eslint/no-inferrable-types": ["off"]
}
}, {
"files": ["test/**/**.ts"],
Expand All @@ -60,18 +49,11 @@
"plugins": [
"@typescript-eslint",
"import",
"jsdoc",
"n"
"node"
],
"settings": {
"import/parsers": {
"@typescript-eslint/parser": [".ts"]
},
"jsdoc": {
"exemptDestructuredRootsFromChecks": true,
"tagNamePreference": {
"hidden": "hidden"
}
}
},
"rules": {
Expand Down Expand Up @@ -108,7 +90,9 @@
"groups": ["builtin", "external","internal", "parent", "sibling", "index", "type", "object", "unknown"],
"warnOnUnassignedImports": true
}],
"n/file-extension-in-import": ["error", "always"],
"node/file-extension-in-import": ["error", "always", {
"tryExtensions": [".js", ".json"]
}],
"newline-per-chained-call": ["error", {
"ignoreChainWithDepth": 2
}],
Expand All @@ -124,6 +108,13 @@
}],
"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
}],
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
github: [giladgd, ido-pluto]
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
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-report.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ body:
description: >-
Add any other context about the bug report here.
- type: checkboxes
id: features
id: drivers
attributes:
label: Relevant Features Used
options:
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: features
id: drivers
attributes:
label: Related Features to This Feature Request
options:
Expand Down
62 changes: 6 additions & 56 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -176,19 +176,16 @@ jobs:
await $`mkdir -p llamaBins`;
for (const arch of arches) {
const additionalFlags = [];
let buildNodeVersion = nodeVersion;
if (process.env.ARTIFACT_NAME === "win" && arch === "arm64") {
buildNodeVersion = windowsOnArmNodeVersion;
} else if (process.env.ARTIFACT_NAME === "mac" && arch === "x64") {
additionalFlags.push("--no-metal");
}
console.log(`Building ${arch} for node ${buildNodeVersion}`);
const binName = `${process.env.ARTIFACT_NAME}-${arch}`;
await $`node ./dist/cli/cli.js build --arch ${arch} --nodeTarget ${buildNodeVersion} ${additionalFlags}`;
const binName = `${process.env.ARTIFACT_NAME}-${arch}`;
await $`node ./dist/cli/cli.js build --arch ${arch} --nodeTarget ${buildNodeVersion}`;
await $`mv ./llama/build/Release ${"./llamaBins/" + binName}`;
}
Expand Down Expand Up @@ -240,56 +237,9 @@ jobs:
- name: Run standalone tests
run: npm run test:standalone

model-dependent-tests:
name: Model dependent tests
runs-on: macos-13
needs:
- build
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"

- name: Download build artifact
uses: actions/download-artifact@v3
with:
name: build
path: dist

- name: Download llama.cpp artifact
uses: actions/download-artifact@v3
with:
name: llama.cpp
path: llama/llama.cpp

- name: Install dependencies on macOS
run: |
brew install cmake ninja
alias make=cmake
- name: Install modules
run: npm ci

- name: Build binary
run: node ./dist/cli/cli.js build

- name: Cache models
id: cache-test-models
uses: actions/cache@v3
with:
path: "test/.models/**.gguf"
key: cache-test-models-${{ runner.os }}-${{ github.workflow }}

- name: Download models or ensure all models are downloaded
run: npm run dev:setup:downloadAllTestModels

- name: Run model dependent tests
run: npm run test:modelDependent

release:
name: Release
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/beta'
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
concurrency: release-${{ github.ref }}
environment:
Expand Down Expand Up @@ -346,20 +296,20 @@ jobs:
echo "npm-url=https://www.npmjs.com/package/node-llama-cpp/v/$(cat .semanticRelease.npmPackage.deployedVersion.txt)" >> $GITHUB_OUTPUT
fi
- name: Generate docs with updated version
if: steps.set-npm-url.outputs.npm-url != '' && github.ref == 'refs/heads/master'
if: steps.set-npm-url.outputs.npm-url != ''
env:
DOCS_URL_BASE: "/node-llama-cpp/"
run: |
export DOCS_PACKAGE_VERSION=$(cat .semanticRelease.npmPackage.deployedVersion.txt)
npm run docs:build
- name: Upload docs to GitHub Pages
if: steps.set-npm-url.outputs.npm-url != '' && github.ref == 'refs/heads/master'
if: steps.set-npm-url.outputs.npm-url != ''
uses: actions/upload-pages-artifact@v2
with:
name: pages-docs
path: docs-site
- name: Deploy docs to GitHub Pages
if: steps.set-npm-url.outputs.npm-url != '' && github.ref == 'refs/heads/master'
if: steps.set-npm-url.outputs.npm-url != ''
uses: actions/deploy-pages@v2
with:
artifact_name: pages-docs
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ node_modules
/.env
/.eslintcache
/.vitepress/.cache
/test/.models
/coverage

/llama/compile_commands.json
Expand Down
21 changes: 21 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"branches": [
"master"
],
"ci": true,
"plugins": [
["@semantic-release/commit-analyzer", {
"preset": "angular",
"releaseRules": [
{"type": "feat", "scope": "minor", "release": "patch"},
{"type": "docs", "scope": "README", "release": "patch"}
]
}],
"@semantic-release/release-notes-generator",
"@semantic-release/npm",
"@semantic-release/github",
["@semantic-release/exec", {
"publishCmd": "echo \"${nextRelease.version}\" > .semanticRelease.npmPackage.deployedVersion.txt"
}]
]
}
49 changes: 0 additions & 49 deletions .releaserc.ts

This file was deleted.

Loading

0 comments on commit aaca68e

Please sign in to comment.