Skip to content

Commit

Permalink
improve weaviate integration page (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 authored Sep 11, 2024
1 parent 162e858 commit 6048f09
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions integrations/weaviate-document-store.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@ pip install weaviate-haystack

## Usage

Once installed, initialize your Weaviate database to use it with Haystack 2.0:
Once installed, initialize your Weaviate database to use it with Haystack 2.x.

```python
from haystack.utils.auth import Secret
from haystack_integrations.document_stores.weaviate import WeaviateDocumentStore, AuthApiKey
In this example, we use the temporary embedded version for simplicity.
To use a self-hosted Docker container or Weaviate Cloud Service, take a look at the [docs](https://docs.haystack.deepset.ai/docs/weaviatedocumentstore).

```python
from haystack_integrations.document_stores.weaviate import WeaviateDocumentStore
from weaviate.embedded import EmbeddedOptions

auth_client_secret = AuthApiKey(Secret.from_token("MY_WEAVIATE_API_KEY"))
document_store = WeaviateDocumentStore(auth_client_secret=auth_client_secret)
document_store = WeaviateDocumentStore(embedded_options=EmbeddedOptions())
```

### Writing Documents to WeaviateDocumentStore
Expand Down

0 comments on commit 6048f09

Please sign in to comment.