I get the following error when creating the AmazonKendraRetriever using LangChain version 0.0.229.
Code to create retriever:
retriever = AmazonKendraRetriever(index_id=kendra_index)
Error:
__root__
Could not load credentials to authenticate with AWS client. Please check that credentials in the specified profile name are valid. (type=value_error)
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 171, in lambda_handler
retriever = AmazonKendraRetriever(index_id=kendra_index)
File "/opt/python/langchain/load/serializable.py", line 74, in __init__
super().__init__(**kwargs)
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__```
When using LangChain version 0.0.219 this error does not occur.
Issue also raised on aws-samples git repo with potential solution: https://github.com/aws-samples/amazon-kendra-langchain-extensions/issues/24
### Who can help?
_No response_
### Information
- [ ] The official example notebooks/scripts
- [ ] My own modified scripts
### Related Components
- [ ] LLMs/Chat Models
- [ ] Embedding Models
- [ ] Prompts / Prompt Templates / Prompt Selectors
- [ ] Output Parsers
- [ ] Document Loaders
- [X] Vector Stores / Retrievers
- [ ] Memory
- [ ] Agents / Agent Executors
- [ ] Tools / Toolkits
- [ ] Chains
- [ ] Callbacks/Tracing
- [ ] Async
### Reproduction
1. Install latest version of Langchain
2. Follow instructions here: https://python.langchain.com/docs/modules/data_connection/retrievers/integrations/amazon_kendra_retriever
### Expected behavior
Error not thrown when creating AmazonKendraRetriever
System Info
LangChain version: 0.0.229 Platform: AWS Lambda execution Python version: 3.9
I get the following error when creating the AmazonKendraRetriever using LangChain version 0.0.229. Code to create retriever:
retriever = AmazonKendraRetriever(index_id=kendra_index)
Error: