aws-samples / amazon-kendra-langchain-extensions

Samples to build Generative AI applications with LangChain and Amazon Kendra
https://aws.amazon.com/blogs/machine-learning/quickly-build-high-accuracy-generative-ai-applications-on-enterprise-data-using-amazon-kendra-langchain-and-large-language-models/
MIT No Attribution
158 stars 104 forks source link

Feature: Added Llama 2 integration #28

Closed kmanuwai closed 1 year ago

kmanuwai commented 1 year ago

Description of changes: Added integration of Llama 2.

To run:

export AWS_REGION = "<YOUR_AWS_REGION>"
export KENDRA_INDEX_ID = "<YOUR_KENDRA_INDEX_ID>"
export LLAMA_2_ENDPOINT="<YOUR_SAGEMAKER_ENDPOINT_NAME>"
streamlit run app.py llama2

Note: as Llama 2 is only currently available in us-east 1 and us-west 2. Manual change of region may be required in code (kendra_chat_llama_2.py). I.e. hosting Llama 2 in us-east-1 but running Streamlit application and Kendra index in ap-southeast-2. But as Llama 2 becomes available in other regions, it will not be an issue.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.