aws-samples / amazon-transcribe-live-meeting-assistant

MIT No Attribution
68 stars 24 forks source link

Assistant fails when Bedrock KB article is sourced from new KB web crawler data source connector #43

Closed rstrahan closed 3 months ago

rstrahan commented 3 months ago

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 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.

rstrahan commented 3 months ago

Fixed in v0.1.5