Skip to content

Commit

Permalink
Added args to additional method
Browse files Browse the repository at this point in the history
  • Loading branch information
cgivre committed Nov 11, 2024
1 parent 565bbf5 commit 5b2481b
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gpt4all-bindings/python/gpt4all/gpt4all.py
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,8 @@ def retrieve_model(
model_path: str | os.PathLike[str] | None = None,
allow_download: bool = True,
verbose: bool = False,
proxies: dict = None,
verify_ssl: bool = True,
) -> ConfigType:
"""
Find model file, and if it doesn't exist, download the model.
Expand All @@ -314,17 +316,21 @@ def retrieve_model(
~/.cache/gpt4all/.
allow_download: Allow API to download model from gpt4all.io. Default is True.
verbose: If True (default), print debug messages.
proxies: A dictionary of proxies to be used for remote calls.
verify_ssl: If true, verify SSL certificates. Defaults to true.
Returns:
Model config.
"""

model_filename = append_extension_if_missing(model_name)
if proxies is None:
proxies = {}

# get the config for the model
config: ConfigType = {}
if allow_download:
available_models = cls.list_models()
available_models = cls.list_models(proxies=proxies, verify_ssl=verify_ssl)

for m in available_models:
if model_filename == m["filename"]:
Expand Down

0 comments on commit 5b2481b

Please sign in to comment.