From 6fcdf2efa51b0c321d8332ddb0cc28950677738d Mon Sep 17 00:00:00 2001 From: Server Serverlesskiy Date: Wed, 7 Feb 2024 19:53:25 +0700 Subject: [PATCH 1/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 33587f4..fdb674f 100644 --- a/README.md +++ b/README.md @@ -118,7 +118,7 @@ For our example we would index the content of https://www.paulgraham.com website * On Linux, ensure that the `run.sh` file is executable by running the following command: ```bash - cmhod +x run.sh + chmod +x run.sh ``` * On Windows, ensure that you run this command from within the WSL 2 environment. From 3a37d4b5443c683832c9632f31e8e68699587517 Mon Sep 17 00:00:00 2001 From: Dmitriy Vasilev Date: Wed, 7 Feb 2024 20:11:30 +0700 Subject: [PATCH 2/4] secret --- .gitignore | 2 +- config/e-commerce.yaml | 18 ++++++++++++++++++ config/jscamp.yaml | 16 ++++++++++++++++ config/supabase.yaml | 14 ++++++++++++++ e-commerce-dev-vectara.pem | 27 +++++++++++++++++++++++++++ run.sh | 0 secrets.example.toml | 2 -- secrets.toml | 15 +++++++++++++++ 8 files changed, 91 insertions(+), 3 deletions(-) create mode 100644 config/e-commerce.yaml create mode 100644 config/jscamp.yaml create mode 100644 config/supabase.yaml create mode 100644 e-commerce-dev-vectara.pem mode change 100644 => 100755 run.sh delete mode 100644 secrets.example.toml create mode 100644 secrets.toml diff --git a/.gitignore b/.gitignore index f6b3580..6273790 100644 --- a/.gitignore +++ b/.gitignore @@ -116,7 +116,7 @@ env.bak/ venv.bak/ # secrets file in TOML format -secrets.toml +# secrets.toml # Spyder project settings .spyderproject diff --git a/config/e-commerce.yaml b/config/e-commerce.yaml new file mode 100644 index 0000000..46df23e --- /dev/null +++ b/config/e-commerce.yaml @@ -0,0 +1,18 @@ +vectara: + corpus_id: 2 + customer_id: 2252938633 + reindex: true + +crawling: + crawler_type: website + +website_crawler: + root_domain: https://www.ozon.ru + urls: + [ + 'https://www.ozon.ru/search/?from_global=true&sorting=new&text=%D1%82%D0%BE%D0%B2%D0%B0%D1%80%D1%8B+%D0%B4%D0%BB%D1%8F+%D0%B4%D0%B5%D0%B2%D0%BE%D1%87%D0%B5%D0%BA' + ] + max_depth: 6 + delay: 1 + pages_source: crawl + extraction: playwright diff --git a/config/jscamp.yaml b/config/jscamp.yaml new file mode 100644 index 0000000..7c2a355 --- /dev/null +++ b/config/jscamp.yaml @@ -0,0 +1,16 @@ +vectara: + corpus_id: 4 + customer_id: 2252938633 + reindex: false + +crawling: + crawler_type: docs + +docs_crawler: + base_urls: ['https://www.jscamp.app'] + pos_regex: ['https://www.jscamp.app/docs.*'] + docs_repo: 'https://github.com/gHashTag/jscamp' + docs_homepage: 'https://www.jscamp.app/docs' + docs_system: 'docusaurus' + neg_regex: [] + extensions_to_ignore: ['md', 'rst', 'ipynb', 'txt'] diff --git a/config/supabase.yaml b/config/supabase.yaml new file mode 100644 index 0000000..4558904 --- /dev/null +++ b/config/supabase.yaml @@ -0,0 +1,14 @@ +vectara: + corpus_id: 6 + customer_id: 2252938633 + reindex: true + +crawling: + crawler_type: database + +database_crawler: + db_url: 'postgresql+psycopg2://postgres.xwnkrqjxeyyfposbfpez:zizdu3-dukhud-xyMxeg@aws-0-eu-central-1.pooler.supabase.com:5432/postgres' + db_table: ecommerce + doc_id_columns: [product] + text_columns: [product] + metadata_columns: [category, author, usd, rub, url, image_url] diff --git a/e-commerce-dev-vectara.pem b/e-commerce-dev-vectara.pem new file mode 100644 index 0000000..5231027 --- /dev/null +++ b/e-commerce-dev-vectara.pem @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpQIBAAKCAQEAtbgB5Re0yLVb2qxUkgtDk25xQEnnO6ydTKt4B2WQ6Bntlypl +9DnmYmMBi3DuI4ISFrNXW5GT2vJEtiN9K+IKbUi5pF7V4fJphO506vR6RLqSLNGB +2QxCzdTS6OkOdPBbZ7H9SxturFODhZZBIPZfSn7ZQQj3+m4/5ZCwmFEmYfXK3aV+ +tO8FC4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PdPzip6srC37Bj3N7Y4svnTfa61EnDBnZA ++hRVzu8fzH7Ddvbraczu653rQz6MgM/imB1aETPSO2zKvn7iyS1ge70IWmFobjWc +iFkSAHZR1fk29LLomOvWI7sJpCTkxaftg0iHjroJNdjNgxIg6pG5JAQDkQeNCtms +ki8NEUT1AoGAd0NU2o6pOnZcs/1SQOnd7X7BKgnkTtzkL2gvzzQ1NDAw24VsQsZi +OiueiXidblA8vFeJJQR2FXkq0qClaUUknRoMWGIy66sWvGNbBJY/BBud5xeBMYqD +poy4LuXsAnLIqabGG0mnkU9EkIF8Nzvz23aO80bI2HshInQXuvyIzE8= +-----END RSA PRIVATE KEY----- \ No newline at end of file diff --git a/run.sh b/run.sh old mode 100644 new mode 100755 diff --git a/secrets.example.toml b/secrets.example.toml deleted file mode 100644 index b26dbf6..0000000 --- a/secrets.example.toml +++ /dev/null @@ -1,2 +0,0 @@ -[default] -api_key="...vectara-api-key..." diff --git a/secrets.toml b/secrets.toml new file mode 100644 index 0000000..0170d80 --- /dev/null +++ b/secrets.toml @@ -0,0 +1,15 @@ +[default] +api_key="zwt_hkkdiZC4wcHVUcFzbPMI9C60WXspKnUWpN9Wkw" + +[Corpus2] +api_key="zwt_hkkdidRcx49sOx-7zzL9uDtQXhAJQk1SyX_TTw" + +[Corpus3] +api_key="zwt_hkkdiZL12kbdwQ0fq9Vxck3Og4wtJqbW80A5yQ" +NOTION_API_KEY="secret_hxChZYERzQVXutMtoQT1kGVLhvvoHn3vpkTMQ4dRiZt" + +[Corpus4] +api_key="zwt_hkkdie2-9vfd3F104Xm7ph-bC9rw4zpNsehoIw" + +[Corpus6] +api_key="zwt_hkkdidrEx37Nyf4osF8vpyWpVfgAJT52zzBdVA" \ No newline at end of file From e9a78aadb21fa5136caf1bb91f3475d9def81575 Mon Sep 17 00:00:00 2001 From: Dmitriy Vasilev Date: Wed, 7 Feb 2024 20:36:17 +0700 Subject: [PATCH 3/4] secret --- Dockerfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Dockerfile b/Dockerfile index 5852e3f..2849e41 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,11 @@ RUN apt-get update RUN apt-get install -y vim RUN apt install -y unixodbc +RUN apt-get install -y python3-pip +RUN pip3 install --upgrade pip +RUN pip install psycopg2-binary + + RUN wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb RUN dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb From 54fe4d29126682fa282ddf546cc4af6988c66f0e Mon Sep 17 00:00:00 2001 From: Server Serverlesskiy Date: Wed, 7 Feb 2024 20:57:32 +0700 Subject: [PATCH 4/4] Delete secrets.toml --- secrets.toml | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 secrets.toml diff --git a/secrets.toml b/secrets.toml deleted file mode 100644 index 0170d80..0000000 --- a/secrets.toml +++ /dev/null @@ -1,15 +0,0 @@ -[default] -api_key="zwt_hkkdiZC4wcHVUcFzbPMI9C60WXspKnUWpN9Wkw" - -[Corpus2] -api_key="zwt_hkkdidRcx49sOx-7zzL9uDtQXhAJQk1SyX_TTw" - -[Corpus3] -api_key="zwt_hkkdiZL12kbdwQ0fq9Vxck3Og4wtJqbW80A5yQ" -NOTION_API_KEY="secret_hxChZYERzQVXutMtoQT1kGVLhvvoHn3vpkTMQ4dRiZt" - -[Corpus4] -api_key="zwt_hkkdie2-9vfd3F104Xm7ph-bC9rw4zpNsehoIw" - -[Corpus6] -api_key="zwt_hkkdidrEx37Nyf4osF8vpyWpVfgAJT52zzBdVA" \ No newline at end of file