Skip to content

ConstantSun/LLM_VNese_RAG

Repository files navigation

LLM_VNese_RAG

RAG, langchain, claude,sbert

How to run:

  • Open all .py file and find all # TODO , follow TODO description to change the values.
  • Suppose you're running on EC2, make sure EC2 role has following permissions:

Permission: AdminAccess

Trust Relationship:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Principal": {
                "Service": "ec2.amazonaws.com"
            },
            "Action": "sts:AssumeRole"
        },
        {
            "Effect": "Allow",
            "Principal": {
                "AWS": "arn:aws:sts::<your acc ID>:assumed-role/<your EC2 instance Role>/<your EC2 instance ID>"
            },
            "Action": "sts:AssumeRole"
        }
    ]
}
  • Make sure your Opensearch Collection has the right Data access policies for your EC2 role access: image

  • Prepare env with python ^3.10.12 and pip ^23.3.1

  • Run as following:

    $ pip install -r requirements.txt
    $ streamlit run webapp.py 
    

Then you'll see a website, looking like this: image This website can be accessible to anyone if your EC2 has public IP address.

About

RAG, langchain, claude,sbert, opensearch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published