fix(upload): correct incorrect dictionary key usage (#9563)

pull/9565/head
-LAN- 1 year ago committed by GitHub
parent 1e829ceaf3
commit faad247d85
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -20,7 +20,7 @@ class FileUploadConfigManager:
data = {
"image_config": {
"number_limits": file_upload_dict["number_limits"],
"transfer_methods": file_upload_dict["allowed_file_upload_methods"],
"transfer_methods": file_upload_dict["allowed_upload_methods"],
}
}

@ -33,7 +33,7 @@ class PromptTemplateParser:
key = match.group(1)
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 value

Loading…
Cancel
Save