prasadnu commited on
Commit
d6d2aeb
·
1 Parent(s): 485568d

RAG changes

Browse files
Files changed (2) hide show
  1. .gitignore +1 -1
  2. RAG/rag_DocumentLoader.py +6 -3
.gitignore CHANGED
@@ -1,3 +1,3 @@
1
  **/__pycache__/
2
  *.DS_Store
3
-
 
1
  **/__pycache__/
2
  *.DS_Store
3
+ vs
RAG/rag_DocumentLoader.py CHANGED
@@ -21,17 +21,20 @@ import generate_csv_for_tables
21
  from pdf2image import convert_from_bytes,convert_from_path
22
  #import langchain
23
 
24
- bedrock_runtime_client = boto3.client('bedrock-runtime',region_name='us-east-1')
25
- textract_client = boto3.client('textract',region_name='us-east-1')
 
 
26
 
27
  region = 'us-east-1'
28
  service = 'es'
29
 
30
  credentials = boto3.Session().get_credentials()
31
  auth = HTTPBasicAuth('prasadnu',st.secrets['rag_shopping_assistant_os_api_access'])
 
32
 
33
  ospy_client = OpenSearch(
34
- hosts = [{'host': 'search-opensearchservi-75ucark0bqob-bzk6r6h2t33dlnpgx2pdeg22gi.us-east-1.es.amazonaws.com', 'port': 443}],
35
  http_auth = auth,
36
  use_ssl = True,
37
  verify_certs = True,
 
21
  from pdf2image import convert_from_bytes,convert_from_path
22
  #import langchain
23
 
24
+ bedrock_runtime_client = boto3.client('bedrock-runtime',aws_access_key_id=st.secrets['user_access_key'],
25
+ aws_secret_access_key=st.secrets['user_secret_key'],region_name='us-east-1')
26
+ textract_client = boto3.client('textract',aws_access_key_id=st.secrets['user_access_key'],
27
+ aws_secret_access_key=st.secrets['user_secret_key'],region_name='us-east-1')
28
 
29
  region = 'us-east-1'
30
  service = 'es'
31
 
32
  credentials = boto3.Session().get_credentials()
33
  auth = HTTPBasicAuth('prasadnu',st.secrets['rag_shopping_assistant_os_api_access'])
34
+ #"https://search-opensearchservi-shjckef2t7wo-iyv6rajdgxg6jas25aupuxev6i.us-west-2.es.amazonaws.com/"
35
 
36
  ospy_client = OpenSearch(
37
+ hosts = [{'host': 'search-opensearchservi-shjckef2t7wo-iyv6rajdgxg6jas25aupuxev6i.us-west-2.es.amazonaws.com', 'port': 443}],
38
  http_auth = auth,
39
  use_ssl = True,
40
  verify_certs = True,