Skip to content

Commit

Permalink
Update pinecone-document-store.md (#145)
Browse files Browse the repository at this point in the history
  • Loading branch information
masci authored Jan 23, 2024
1 parent 5b480ec commit ff59826
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions integrations/pinecone-document-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ pip install pinecone-haystack
To use Pinecone as your data storage for your Haystack LLM pipelines, you must have an account with Pinecone and an API Key. Once you have those, you can initialize a `PineconeDocumentStore` for Haystack:

```python
from haystack.document_stores import PineconeDocumentStore
from haystack_integrations.document_stores.pinecone import PineconeDocumentStore


document_store = PineconeDocumentStore(api_key='YOUR_API_KEY',
similarity="cosine",
Expand All @@ -76,7 +77,8 @@ from haystack.components.converters import MarkdownToDocument
from haystack.components.writers import DocumentWriter
from haystack.components.embedders import SentenceTransformersDocumentEmbedder
from haystack.components.preprocessors import DocumentSplitter
from pinecone_haystack import PineconeDocumentStore
from haystack_integrations.document_stores.pinecone import PineconeDocumentStore


document_store = PineconeDocumentStore(api_key="YOUR_API_KEY",
environment="gcp-starter",
Expand All @@ -102,8 +104,9 @@ Once you have documents in your `PineconeDocumentStore`, it's ready to be used i
from haystack.components.embedders import SentenceTransformersTextEmbedder
from haystack.components.builders import PromptBuilder
from haystack.components.generators import OpenAIGenerator
from pinecone_haystack import PineconeDocumentStore
from pinecone_haystack.dense_retriever import PineconeDenseRetriever
from haystack_integrations.document_stores.pinecone import PineconeDocumentStore
from haystack_integrations.components.retrievers.pinecone import PineconeDenseRetriever


document_store = PineconeDocumentStore(api_key='YOUR_API_KEY',
dimension=768)
Expand Down Expand Up @@ -150,7 +153,8 @@ pip install farm-haystack[pinecone]
To use Pinecone as your data storage for your Haystack LLM pipelines, you must have an account with Pinecone and an API Key. Once you have those, you can initialize a `PineconeDocumentStore` for Haystack:

```python
from haystack.document_stores import PineconeDocumentStore
from haystack_integrations.document_stores.pinecone import PineconeDocumentStore


document_store = PineconeDocumentStore(api_key='YOUR_API_KEY',
similarity="cosine",
Expand All @@ -166,8 +170,9 @@ For this step, you may make use of the available [FileConverters](https://docs.h

```python
from haystack import Pipeline
from haystack.document_stores import PineconeDocumentStore
from haystack.nodes import MarkdownConverter, PreProcessor
from haystack_integrations.document_stores.pinecone import PineconeDocumentStore


document_store = PineconeDocumentStore(api_key='YOUR_API_KEY',
similarity="cosine",
Expand All @@ -189,8 +194,9 @@ Once you have documents in your `PineconeDocumentStore`, it's ready to be used i

```python
from haystack import Pipeline
from haystack.document_stores import PineconeDocumentStore
from haystack.nodes import AnswerParser, EmbeddingRetriever, PromptNode, PromptTemplate
from haystack_integrations.document_stores.pinecone import PineconeDocumentStore


document_store = PineconeDocumentStore(api_key='YOUR_API_KEY',
similarity="cosine",
Expand Down

0 comments on commit ff59826

Please sign in to comment.