Metadata variable value fix (#16665)
This commit is contained in:
parent
360986f38d
commit
86a1859d02
2 changed files with 12 additions and 3 deletions
|
|
@ -900,7 +900,10 @@ class DatasetRetrieval:
|
|||
return str(inputs.get(key, f"{{{{{key}}}}}"))
|
||||
|
||||
pattern = re.compile(r"\{\{(\w+)\}\}")
|
||||
return pattern.sub(replacer, text)
|
||||
output = pattern.sub(replacer, text)
|
||||
if isinstance(output, str):
|
||||
output = re.sub(r"[\r\n\t]+", " ", output).strip()
|
||||
return output
|
||||
|
||||
def _automatic_metadata_filter_func(
|
||||
self, dataset_ids: list, query: str, tenant_id: str, user_id: str, metadata_model_config: ModelConfig
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue