|
|
|
|
|
|
|
|
key = match.group(1) |
|
|
key = match.group(1) |
|
|
value = inputs.get(key, match.group(0)) # return original matched string if key not found |
|
|
value = inputs.get(key, match.group(0)) # return original matched string if key not found |
|
|
|
|
|
|
|
|
if remove_template_variables: |
|
|
|
|
|
|
|
|
if remove_template_variables and isinstance(value, str): |
|
|
return PromptTemplateParser.remove_template_variables(value, self.with_variable_tmpl) |
|
|
return PromptTemplateParser.remove_template_variables(value, self.with_variable_tmpl) |
|
|
return value |
|
|
return value |
|
|
|
|
|
|