Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions customer-graph/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
NEO4J_URI=<YOUR_NEO4J_URI>
NEO4J_USERNAME=<YOUR_NEO4J_USERNAME>
NEO4J_PASSWORD=<YOUR_NEO4J_PASSWORD>
NEO4J_DATABASE=<NEO4J_DATABASE>

#OpenAI
OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>
3 changes: 2 additions & 1 deletion customer-graph/ingest_post_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
NEO4J_URI=os.getenv("NEO4J_URI")
NEO4J_USERNAME=os.getenv("NEO4J_USERNAME")
NEO4J_PASSWORD=os.getenv("NEO4J_PASSWORD")
NEO4J_DATABASE=os.getenv("NEO4J_DATABASE")



Expand All @@ -30,7 +31,7 @@

# create text embeddings for products
print("Creating Product Text Embeddings")
with driver.session(database="neo4j") as session:
with driver.session(database=NEO4J_DATABASE) as session:
session.run('''
MATCH (n:Product) WHERE size(n.description) <> 0
WITH collect(n) AS nodes, toInteger(rand()*$numberOfBatches) AS partition
Expand Down