From aabc642425e73d9a6239783b6f453be03e6b5657 Mon Sep 17 00:00:00 2001 From: ramadhan sjamsani Date: Mon, 19 Jan 2026 17:18:05 +0800 Subject: [PATCH] initial commit --- .env.sample | 4 ++++ .gitignore | 9 +++++++++ database/__init__.py | 0 database/postgres_embedding.py | 4 ++++ main.py | 20 ++++++++++++++++++++ requirements.txt | 14 ++++++++++++++ 6 files changed, 51 insertions(+) create mode 100644 .env.sample create mode 100644 .gitignore create mode 100644 database/__init__.py create mode 100644 database/postgres_embedding.py create mode 100644 main.py create mode 100644 requirements.txt diff --git a/.env.sample b/.env.sample new file mode 100644 index 0000000..69e6b7b --- /dev/null +++ b/.env.sample @@ -0,0 +1,4 @@ +POSTGRESQL_HNSW_M=16 +POSTGRESQL_HNSW_EF_CONSTRUCTION=64 +POSTGRESQL_HNSW_EF_SEARCH=40 +POSTGRESQL_HNSW_DIST_METHOD=vector_cosine_ops \ No newline at end of file diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b3ae7f8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ + +.conda/ +.venv/ +__pycache__/ + +.idea/ +.vscode/ + +.env \ No newline at end of file diff --git a/database/__init__.py b/database/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/database/postgres_embedding.py b/database/postgres_embedding.py new file mode 100644 index 0000000..82b8917 --- /dev/null +++ b/database/postgres_embedding.py @@ -0,0 +1,4 @@ + + +def ingest_document(source_dir: str = "database"): + Settings.emb \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..dae7524 --- /dev/null +++ b/main.py @@ -0,0 +1,20 @@ +from dotenv import load_dotenv + + + +# This is a sample Python script. + +# Press Shift+F10 to execute it or replace it with your code. +# Press Double Shift to search everywhere for classes, files, tool windows, actions, and settings. + + +def print_hi(name): + # Use a breakpoint in the code line below to debug your script. + print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint. + + +# Press the green button in the gutter to run the script. +if __name__ == '__main__': + print_hi('PyCharm') + +# See PyCharm help at https://www.jetbrains.com/help/pycharm/ diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..9a780bd --- /dev/null +++ b/requirements.txt @@ -0,0 +1,14 @@ +langchain +langchain-google-genai +langchain-google-vertexai +langgraph-checkpoint-postgres +python-dotenv +psycopg-binary +psycopg2-pool + +llama-index +llama-index-core +llama-index-vector-stores-postgres +llama-index-embeddings-google-genai +llama-index-llms-google-genai +llama-index-vector-stores-pinecone \ No newline at end of file