aws-samples / aws-lex-conv-faq

Demonstration of LLM integration into a lex bot using Lambda codehooks and a Sagemaker endpoint.
MIT No Attribution
11 stars 6 forks source link

[Error] when uploading txt file to source materials bucket #7

Open nghtm opened 1 year ago

nghtm commented 1 year ago

Revieve following error from the read-source-and-build-index Lambda function when I try to upload attached .txt file to the source materials bucket. Able to execute with a pdf instead
allergies_faq.txt

[ERROR] TypeError: __init__() takes 1 positional argument but 2 were givenTraceback (most recent call last):  File "/var/task/index_creation_app.py", line 63, in handler    documents = [Document(t) for t in text_list]  File "/var/task/index_creation_app.py", line 63, in <listcomp>    documents = [Document(t) for t in text_list] | [ERROR] TypeError: __init__() takes 1 positional argument but 2 were given Traceback (most recent call last):   File "/var/task/index_creation_app.py", line 63, in handler     documents = [Document(t) for t in text_list]   File "/var/task/index_creation_app.py", line 63, in <listcomp>     documents = [Document(t) for t in text_list]
-- | --