Spaces:
Sleeping
Sleeping
Update connections/pinecone.py
Browse files- connections/pinecone.py +8 -3
connections/pinecone.py
CHANGED
@@ -8,7 +8,7 @@ from llama_index.ingestion import IngestionPipeline
|
|
8 |
|
9 |
class PineconeConnector:
|
10 |
"""
|
11 |
-
A way to call the pinecone
|
12 |
"""
|
13 |
def __init__(self, api_key, index_name, embedding):
|
14 |
self.pinecone_api_key = api_key
|
@@ -65,7 +65,12 @@ class PineconeConnector:
|
|
65 |
return pipeline
|
66 |
|
67 |
def run(self):
|
68 |
-
"""creates the pipeline, returns the
|
69 |
pipeline = create_pipeline()
|
70 |
-
return
|
|
|
|
|
|
|
|
|
|
|
71 |
|
|
|
8 |
|
9 |
class PineconeConnector:
|
10 |
"""
|
11 |
+
A way to call the pinecone DB
|
12 |
"""
|
13 |
def __init__(self, api_key, index_name, embedding):
|
14 |
self.pinecone_api_key = api_key
|
|
|
65 |
return pipeline
|
66 |
|
67 |
def run(self):
|
68 |
+
"""creates the pipeline, returns the connection and the embedder."""
|
69 |
pipeline = create_pipeline()
|
70 |
+
return {
|
71 |
+
"connection": self.pc,
|
72 |
+
"pipeline": pipeline,
|
73 |
+
"embedder": self.embedder
|
74 |
+
|
75 |
+
}
|
76 |
|