keys fallback

This commit is contained in:
mrT23
2024-07-03 20:29:17 +03:00
parent 0bac03496a
commit e30c70d2ca
2 changed files with 3 additions and 2 deletions

View File

@ -565,7 +565,7 @@ def try_fix_yaml(response_text: str,
except:
pass
# forth fallback - try to extract yaml snippet by first_key and 'last_key'
# forth fallback - try to extract yaml snippet by 'first_key' and 'last_key'
# note that 'last_key' can be in practice a key that is not the last key in the yaml snippet.
# it just needs to be some inner key, so we can look for newlines after it
if first_key and last_key: