Skip to content

Commit

Permalink
fix(upload): correct incorrect dictionary key usage (langgenius#9563)
Browse files Browse the repository at this point in the history
  • Loading branch information
laipz8200 authored Oct 21, 2024
1 parent 1e829ce commit faad247
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion api/core/app/app_config/features/file_upload/manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def convert(cls, config: Mapping[str, Any], is_vision: bool = True):
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"],
}
}

Expand Down
2 changes: 1 addition & 1 deletion api/core/prompt/utils/prompt_template_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ def replacer(match):
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

Expand Down

0 comments on commit faad247

Please sign in to comment.