File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
gpt4all-bindings/python/gpt4all Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -304,6 +304,8 @@ def retrieve_model(
304
304
model_path : str | os .PathLike [str ] | None = None ,
305
305
allow_download : bool = True ,
306
306
verbose : bool = False ,
307
+ proxies : dict = None ,
308
+ verify_ssl : bool = True ,
307
309
) -> ConfigType :
308
310
"""
309
311
Find model file, and if it doesn't exist, download the model.
@@ -314,17 +316,21 @@ def retrieve_model(
314
316
~/.cache/gpt4all/.
315
317
allow_download: Allow API to download model from gpt4all.io. Default is True.
316
318
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.
317
321
318
322
Returns:
319
323
Model config.
320
324
"""
321
325
322
326
model_filename = append_extension_if_missing (model_name )
327
+ if proxies is None :
328
+ proxies = {}
323
329
324
330
# get the config for the model
325
331
config : ConfigType = {}
326
332
if allow_download :
327
- available_models = cls .list_models ()
333
+ available_models = cls .list_models (proxies = proxies , verify_ssl = verify_ssl )
328
334
329
335
for m in available_models :
330
336
if model_filename == m ["filename" ]:
You can’t perform that action at this time.
0 commit comments