Files
langchain-python/langchain
Víctor Navarro Aránguiz f39340ff6b Add allow_download as attribute for GPT4All (#5512)
# Added support for download GPT4All model if does not exist

I've include the class attribute `allow_download` to the GPT4All class.
By default, `allow_download` is set to False.

## Changes Made
- Added a new attribute `allow_download` to the GPT4All class.
- Updated the `validate_environment` method to pass the `allow_download`
parameter to the GPT4All model constructor.

## Context
This change provides more control over model downloading in the GPT4All
class. Previously, if the model file was not found in the cache
directory `~/.cache/gpt4all/`, the package returned error "Failed to
retrieve model (type=value_error)". Now, if `allow_download` is set as
True then it will use GPT4All package to download it . With the addition
of the `allow_download` attribute, users can now choose whether the
wrapper is allowed to download the model or not.

## Dependencies
There are no new dependencies introduced by this change. It only
utilizes existing functionality provided by the GPT4All package.

## Testing
Since this is a minor change to the existing behavior, the existing test
suite for the GPT4All package should cover this scenario

Co-authored-by: Vokturz <victornavarrrokp47@gmail.com>
2023-05-31 13:32:31 -07:00
..
2023-05-30 18:47:06 -07:00
2023-05-30 07:15:37 -07:00
2023-05-25 16:20:06 -07:00
2023-05-20 08:21:52 -07:00
2023-05-17 01:28:43 +00:00
2023-05-15 15:38:49 +00:00
2023-05-17 22:50:35 +00:00
2022-11-12 11:22:32 -08:00
2023-02-20 21:15:45 -08:00
2023-05-16 13:26:43 +00:00
2023-05-29 07:52:30 -07:00