feat: Enhance YAML parsing with additional fallbacks and key customization in load_yaml and try_fix_yaml functions

This commit is contained in:
mrT23
2023-12-21 08:24:07 +02:00
parent 553dad0bee
commit 2b23700aec

View File

@ -326,7 +326,7 @@ def load_yaml(response_text: str, keys_fix_yaml: List[str] = []) -> dict:
return data
def try_fix_yaml(response_text: str, keys_fix_yaml: List[str]) -> dict:
def try_fix_yaml(response_text: str, keys_fix_yaml: List[str] = []) -> dict:
response_text_lines = response_text.split('\n')
keys = ['relevant line:', 'suggestion content:', 'relevant file:', 'existing code:', 'improved code:']