mirror of
https://github.com/deepset-ai/haystack.git
synced 2025-12-27 15:08:43 +00:00
avoid empty api_endpoint (#2588)
This commit is contained in:
parent
7caca41c5d
commit
b6986ea25d
@ -194,14 +194,12 @@ class Pipeline:
|
||||
for component_config in pipeline_config["components"]:
|
||||
if component_config["type"] == "DeepsetCloudDocumentStore":
|
||||
params = component_config.get("params", {})
|
||||
params.update(
|
||||
{
|
||||
"api_key": api_key,
|
||||
"api_endpoint": api_endpoint,
|
||||
"workspace": workspace,
|
||||
"index": pipeline_config_name,
|
||||
}
|
||||
)
|
||||
params["index"] = pipeline_config_name
|
||||
params["workspace"] = workspace
|
||||
if api_endpoint is not None:
|
||||
params["api_endpoint"] = api_endpoint
|
||||
if api_key is not None:
|
||||
params["api_key"] = api_key
|
||||
component_config["params"] = params
|
||||
|
||||
del pipeline_config["name"] # Would fail validation otherwise
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user