Assistant queries fail with error message:
Default message - you'll see this only if the lambda hook failed
CW logs for the QNABedrockKnowledgeBaseFunction show exception
[ERROR] TypeError: expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
File "/var/task/qna_bedrockkb_lambdahook_function.py", line 279, in handler
event = format_response(event, kb_response, query)
File "/var/task/qna_bedrockkb_lambdahook_function.py", line 198, in format_response
title = os.path.basename(url)
File "<frozen posixpath>", line 142, in basename
The code is expecting only s3Location.. needs to be more dynamic.
Describe the bug
Assistant queries fail with error message:
Default message - you'll see this only if the lambda hook failed
CW logs for the
QNABedrockKnowledgeBaseFunction
show exceptionThe code is expecting only s3Location.. needs to be more dynamic.