support Amazon Bedrock

This commit is contained in:
tmokmss
2023-11-28 20:11:40 +09:00
parent 4521077433
commit 1373ca23fc
6 changed files with 42 additions and 8 deletions

View File

@ -290,6 +290,7 @@ def _fix_key_value(key: str, value: str):
def load_yaml(response_text: str) -> dict:
response_text = response_text.removeprefix('```yaml').rstrip('`')
response_text = response_text.strip().rstrip().removeprefix('{').removesuffix('}')
try:
data = yaml.safe_load(response_text)
except Exception as e: