gpt4all
gpt4all copied to clipboard
Fix BOS error and crash on model creation error
Describe your changes
- Reuse context between text completion requests. Fixes the BOS error for Hermes and similar.
- Closes #996
- Addresses https://github.com/nomic-ai/gpt4all/issues/649#issuecomment-1572128068
- Fix a crash when the backend reports an error on
llmodel_model_create2
and exposeLLModel::SetImplementationSearchPath
.- Closes #1062
Breaking Changes
- Removed
PredictRequestOptions
parameter fromITextPrediction
methods.-
IGpt4AllModel
interface now exposes anLLModelPromptContext
used for all the request.
Before the context used to be recreated for each request.
-
-
IGpt4AllModelFactory.LoadModel
now can throw more specific exceptions:-
ModelLoadException
-
ModelCreationException
(with the underlying error code/message)
-
Issue ticket number and link
Checklist before requesting a review
- [x] I have performed a self-review of my code.
- [ ] If it is a core feature, I have added thorough tests.
- [ ] I have added thorough documentation for my code.
- [x] I have tagged PR with relevant project labels. I acknowledge that a PR without labels may be dismissed.
- [x] If this PR addresses a bug, I have provided both a screenshot/video of the original bug and the working solution.
Demo
Steps to Reproduce
Notes
Is this ready?
Is this ready?
Tested a couple more things. ready now
Re the IGpt4AllModel interface change - are you absolutely sure you want to expose that low-level type as part of this high-level API? Feels like the design of this lib so far is that all of the stuff in Bindings is encapsulated and hidden away by the higher-level stuff. You'd be breaking that with this change. IMO PredictRequestOptions does serve a purpose - it's just that it should probably be scoped to a Gpt4All (or something higher-level, anyway - don't know if you've considered something like adding something along the lines of ITextPrediction IGpt4AllModel.CreatePredictionContext(opts)) rather than an individual prediction request?
Is this out of date and to be closed?
mvenditto hasn't been active here in a long time - we can close this.