initial commit

This commit is contained in:
2026-01-19 17:18:05 +08:00
commit aabc642425
6 changed files with 51 additions and 0 deletions

4
.env.sample Normal file
View File

@@ -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

9
.gitignore vendored Normal file
View File

@@ -0,0 +1,9 @@
.conda/
.venv/
__pycache__/
.idea/
.vscode/
.env

0
database/__init__.py Normal file
View File

View File

@@ -0,0 +1,4 @@
def ingest_document(source_dir: str = "database"):
Settings.emb

20
main.py Normal file
View File

@@ -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/

14
requirements.txt Normal file
View File

@@ -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