-
Notifications
You must be signed in to change notification settings - Fork 7.2k
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
typescript bindings maintenance #2363
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: jacob <jacoobes@sern.dev> update typings Signed-off-by: jacob <jacoobes@sern.dev>
Signed-off-by: jacob <jacoobes@sern.dev>
…arts Signed-off-by: limez <limez@protonmail.com>
… in ci Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: limez <limez@protonmail.com>
…fallback easier testable Signed-off-by: limez <limez@protonmail.com>
…the others Signed-off-by: limez <limez@protonmail.com>
Signed-off-by: Jacob Nguyen <76754747+jacoobes@users.noreply.github.com>
|
||
// Silently ignore if the backend sources are not available. | ||
// When the package is installed as a dependency, gpt4all-backend will not be present. | ||
if (fs.existsSync(sourcePath)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could this be a usecase for fs.mkdir(sourcePath, { recursive: true })?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not what we want here I think, because when the script gets executed by the user during the install hook (ie user installs the package as a dependency) this would create a gpt4all-backend
path under node_modules. And then error because there are no gpt4all-backend sources under that newly created dir. We really just want it to do nothing in that case.
Describe your changes
nCtx
on completions.so
files with the correct build type.Release
build type.LLModel:load
andLLModel:initGpu
methods so its easier to copy the loading and backend-picking logic of the CUDA Backend PR. I also renamed a few things for consistency.nThreads
in theLoadModelOptions
, previously it had to be configured via setThreadCount.nGpuLayers
as alias forngl
to theLoadModelOptions
.test:ci
script. Can switch CI config back toyarn test
if inference in CI is possible.node-gyp-build
is still working. Changed the build setup a bit to include aassert-backend-sources.js
script that facilitates easier testing of the fallback during development. This also allows us to get rid of the second bindings.gyp config.Breaking changes
CompletionOptions
onReponseToken(tokenId, text)
callback has been changed toonResponseTokens({ tokenIds, text })
(Note the plural.). This is related to the streamed emoji decoding / multi token character issue.Issue ticket number and link
#2326