Pijush2023 commited on
Commit
ed953e6
·
verified ·
1 Parent(s): b88951f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -19,9 +19,12 @@ graph = Neo4jGraph(
19
  password="_x8f-_aAQvs2NB0x6s0ZHSh3W_y-HrENDbgStvsUCM0"
20
  )
21
 
 
 
 
22
  # Initialize the vector index with Neo4j
23
  vector_index = Neo4jVector.from_existing_graph(
24
- embeddings=OpenAIEmbeddings(api_key="YOUR_OPENAI_API_KEY"),
25
  graph=graph,
26
  search_type="hybrid",
27
  node_label="Document",
 
19
  password="_x8f-_aAQvs2NB0x6s0ZHSh3W_y-HrENDbgStvsUCM0"
20
  )
21
 
22
+ # Create an instance of OpenAI embeddings
23
+ embedding = OpenAIEmbeddings(api_key=os.environ['OPENAI_API_KEY'])
24
+
25
  # Initialize the vector index with Neo4j
26
  vector_index = Neo4jVector.from_existing_graph(
27
+ embeddings=embedding,
28
  graph=graph,
29
  search_type="hybrid",
30
  node_label="Document",