Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
chatbot-lab
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LSDS
Teaching
Master
Cloud
chatbot-lab
Commits
556e8058
Commit
556e8058
authored
7 months ago
by
nabil.abdennad
Browse files
Options
Downloads
Patches
Plain Diff
minor updates
parent
6c872c7d
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Part1/vectorise-store.py
+0
-12
0 additions, 12 deletions
Part1/vectorise-store.py
with
0 additions
and
12 deletions
Part1/vectorise-store.py
+
0
−
12
View file @
556e8058
...
...
@@ -9,9 +9,6 @@ from opensearchpy import OpenSearch, RequestsHttpConnection, AWSV4SignerAuth
from
langchain_community.vectorstores
import
OpenSearchVectorSearch
import
argparse
## S3_client
s3_client
=
boto3
.
client
(
'
s3
'
)
...
...
@@ -24,8 +21,6 @@ credentials = boto3.Session().get_credentials()
awsauth
=
AWSV4SignerAuth
(
credentials
,
'
us-east-1
'
,
'
aoss
'
)
## Create Index in Opensearch
def
create_index
(
client
,
index_name
):
indexBody
=
{
...
...
@@ -153,13 +148,6 @@ def main(bucket_name, endpoint,index_name, local_path):
print
(
'
End storing
'
)
if
__name__
==
"
__main__
"
:
parser
=
argparse
.
ArgumentParser
(
description
=
"
Process PDF documents and store their embeddings.
"
)
parser
.
add_argument
(
"
--bucket_name
"
,
help
=
"
The S3 bucket name where documents are stored
"
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment