Skip to content

Commit 5b2481b

Browse files
committed
Added args to additional method
1 parent 565bbf5 commit 5b2481b

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

gpt4all-bindings/python/gpt4all/gpt4all.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,8 @@ def retrieve_model(
304304
model_path: str | os.PathLike[str] | None = None,
305305
allow_download: bool = True,
306306
verbose: bool = False,
307+
proxies: dict = None,
308+
verify_ssl: bool = True,
307309
) -> ConfigType:
308310
"""
309311
Find model file, and if it doesn't exist, download the model.
@@ -314,17 +316,21 @@ def retrieve_model(
314316
~/.cache/gpt4all/.
315317
allow_download: Allow API to download model from gpt4all.io. Default is True.
316318
verbose: If True (default), print debug messages.
319+
proxies: A dictionary of proxies to be used for remote calls.
320+
verify_ssl: If true, verify SSL certificates. Defaults to true.
317321
318322
Returns:
319323
Model config.
320324
"""
321325

322326
model_filename = append_extension_if_missing(model_name)
327+
if proxies is None:
328+
proxies = {}
323329

324330
# get the config for the model
325331
config: ConfigType = {}
326332
if allow_download:
327-
available_models = cls.list_models()
333+
available_models = cls.list_models(proxies=proxies, verify_ssl=verify_ssl)
328334

329335
for m in available_models:
330336
if model_filename == m["filename"]:

0 commit comments

Comments
 (0)