-
Notifications
You must be signed in to change notification settings - Fork 2.4k
feat: Multiple inference engines for nitro and openai #814
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
58 commits
Select commit
Hold shift + click to select a range
c01737f
refactor: Change inference-extension to inference-nitro-extension
hiro-v 48fd8de
feat: Init commit for inference engine for openai extension
hiro-v 19637c4
feat: Add nitro engine settings
hiro-v 337da50
fix: Add fs to read and write nitro engine settings
hiro-v d69f0e3
chore: Update openai engine
hiro-v 6d3bf24
chore: remove gitkeep
hiro-v a985626
feat: Add openai gpt-3.5 model.json
hiro-v 5f8e2ae
fix: Add engine llama.cpp to local models
hiro-v 68ee669
chore: Remove default nitro.json file
hiro-v 9a18d31
chore: refactor openai file structure
hiro-v 8ab36d7
feat: Add openai engine json reader and writer
hiro-v 56b7786
feat: Add nitro engine json reader and writer
hiro-v 9aca37a
chore: Add fs abstraction for checkFileExists
hiro-v 1bc5fe6
fix: Use Events for init, load, stop models
hiro-v 2c648ca
fix: Update nitro with read/ write for engine.json
hiro-v 486c5b8
fix: Update openai with read/ write for engine.json
hiro-v 22f12cd
fix: Update model.json for Hub with engine nitro/ openai
hiro-v 489c858
chore: models ref event handler
louis-jan 750f09c
fix: update engine field in tiny llama 1.1b
hiro-v 0c838ce
fix: Update event types
hiro-v a8e33c2
fix: Update engine as enum
hiro-v a51b206
fix: Add OnModelStopped Event
hiro-v ffbfaf1
feat: Add Event OnModelStop emission to web
hiro-v 05b9a7b
fix: Delete default oai gpt 3.5 settings
hiro-v cb60a7c
chore: Change type ModelRuntimeParam to ModelRuntimeParams
hiro-v fb8729b
fix: Check model engine openai for `Use`
hiro-v 6f55cff
fix: Add model object to MessageRequest
hiro-v b970e97
chore: Move interface definition location
hiro-v 516e226
chore: Move interface definition location
hiro-v 4f2a3b7
fix: Add dynamic values from engine settings and model params to infe…
hiro-v 16f2ffe
fix: Add dynamic values from engine settings and model params to infe…
hiro-v 0c3e236
fix: Add dynamic values from engine settings and model params
hiro-v 7ed8c31
fix: Add dynamic values from engine settings and model params
hiro-v 06ca414
fix: Change model folder name for openai gpt-3.5-turbo
hiro-v 4266d86
fix: Passing model object instead of model id
hiro-v f34024a
fix: spreading model.paramters object and update chatCompletion route
hiro-v a2cf42a
fix: Spreading model.parameters
hiro-v 44bfcaa
fix: Add type def global for nitro extension - inference
hiro-v 3987fdc
feat: Add nitro inference engine stop model handler
hiro-v 6add24c
fix: debugging
hiro-v bb4b4c5
fix: Fix resend button with model object
hiro-v 28368ee
fix: Add engine nitro
hiro-v 6fe901b
fix: Hub fix for undefined model size
hiro-v 2a853a2
feat: Add openai models
hiro-v 5f3cf2b
fix: Temporary disable model parameters spreading
hiro-v e1190ec
fix: Enforce openai inference to load settings from openai.json onLoa…
hiro-v 975e971
chore: remove unused console.log
hiro-v 9daee14
fix: Add hack waiting for model loading
hiro-v 6cd4cb9
fix: model gpt json
hiro-v fbf8ff9
fix: Update lint for engine in ThreadAssistantInfo
hiro-v 1177007
fix: Update code based on comments from @james
hiro-v ef9dfc9
chore: add ready state to remote models
louis-jan b939692
chore: stop inference event
louis-jan f9e73b0
fix: Change base_url to full_url
hiro-v 0ef9a58
fix: BAT for nitro
hiro-v c32ad0a
fix: small change in nitro bin location
hiro-v 7e3e648
fix: inference extensions small syntax fix
hiro-v bbffaaf
feat: Added support for Azure OpenAI API
hiro-v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| @echo off | ||
| set /p NITRO_VERSION=<./bin/version.txt | ||
| .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64-cuda.tar.gz -e --strip 1 -o ./bin/win-cuda && .\node_modules\.bin\download https://github.com/janhq/nitro/releases/download/v%NITRO_VERSION%/nitro-%NITRO_VERSION%-win-amd64.tar.gz -e --strip 1 -o ./bin/win-cpu |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,57 @@ | ||
| { | ||
| "name": "@janhq/inference-nitro-extension", | ||
| "version": "1.0.0", | ||
| "description": "Inference Engine for Nitro Extension, powered by @janhq/nitro, bring a high-performance Llama model inference in pure C++.", | ||
| "main": "dist/index.js", | ||
| "module": "dist/module.js", | ||
| "author": "Jan <[email protected]>", | ||
| "license": "AGPL-3.0", | ||
| "scripts": { | ||
| "build": "tsc -b . && webpack --config webpack.config.js", | ||
| "downloadnitro:linux": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64.tar.gz -e --strip 1 -o ./bin/linux-cpu && chmod +x ./bin/linux-cpu/nitro && chmod +x ./bin/linux-start.sh && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-linux-amd64-cuda.tar.gz -e --strip 1 -o ./bin/linux-cuda && chmod +x ./bin/linux-cuda/nitro && chmod +x ./bin/linux-start.sh", | ||
| "downloadnitro:darwin": "NITRO_VERSION=$(cat ./bin/version.txt) && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-arm64.tar.gz -e --strip 1 -o ./bin/mac-arm64 && chmod +x ./bin/mac-arm64/nitro && download https://github.com/janhq/nitro/releases/download/v${NITRO_VERSION}/nitro-${NITRO_VERSION}-mac-amd64.tar.gz -e --strip 1 -o ./bin/mac-x64 && chmod +x ./bin/mac-x64/nitro", | ||
| "downloadnitro:win32": "download.bat", | ||
| "downloadnitro": "run-script-os", | ||
| "build:publish:darwin": "rimraf *.tgz --glob && npm run build && npm run downloadnitro && ../../.github/scripts/auto-sign.sh && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../electron/pre-install", | ||
| "build:publish:win32": "rimraf *.tgz --glob && npm run build && npm run downloadnitro && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../electron/pre-install", | ||
| "build:publish:linux": "rimraf *.tgz --glob && npm run build && npm run downloadnitro && cpx \"bin/**\" \"dist/bin\" && npm pack && cpx *.tgz ../../electron/pre-install", | ||
| "build:publish": "run-script-os" | ||
| }, | ||
| "exports": { | ||
| ".": "./dist/index.js", | ||
| "./main": "./dist/module.js" | ||
| }, | ||
| "devDependencies": { | ||
| "cpx": "^1.5.0", | ||
| "rimraf": "^3.0.2", | ||
| "run-script-os": "^1.1.6", | ||
| "webpack": "^5.88.2", | ||
| "webpack-cli": "^5.1.4" | ||
| }, | ||
| "dependencies": { | ||
| "@janhq/core": "file:../../core", | ||
| "download-cli": "^1.1.1", | ||
| "electron-log": "^5.0.1", | ||
| "fetch-retry": "^5.0.6", | ||
| "kill-port": "^2.0.1", | ||
| "path-browserify": "^1.0.1", | ||
| "rxjs": "^7.8.1", | ||
| "tcp-port-used": "^1.0.2", | ||
| "ts-loader": "^9.5.0", | ||
| "ulid": "^2.3.0" | ||
| }, | ||
| "engines": { | ||
| "node": ">=18.0.0" | ||
| }, | ||
| "files": [ | ||
| "dist/*", | ||
| "package.json", | ||
| "README.md" | ||
| ], | ||
| "bundleDependencies": [ | ||
| "tcp-port-used", | ||
| "kill-port", | ||
| "fetch-retry", | ||
| "electron-log" | ||
| ] | ||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.