Skip to content

Commit

Permalink
update jina article - new secrets management (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
anakin87 authored Feb 15, 2024
1 parent dfdbfa8 commit 4450830
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions content/blog/using-jina-embeddings-haystack/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Then let's input our credentials. Or you can set them as environment variables i
from getpass import getpass
import os

jina_api_key = getpass("JINA api key:")
os.environ["JINA_API_KEY"] = getpass("JINA api key:")
os.environ["HF_API_TOKEN"] = getpass("Enter your HuggingFace api token: ")
```

Expand Down Expand Up @@ -102,7 +102,7 @@ writer = DocumentWriter(document_store=document_store, policy=DuplicatePolicy.SK

retriever = ChromaEmbeddingRetriever(document_store=document_store)

document_embedder = JinaDocumentEmbedder(api_key=jina_api_key, model="jina-embeddings-v2-base-en")
document_embedder = JinaDocumentEmbedder(model="jina-embeddings-v2-base-en")

indexing_pipeline = Pipeline()
indexing_pipeline.add_component(instance=fetcher, name="fetcher")
Expand Down Expand Up @@ -147,7 +147,7 @@ Documents:
question: {{question}}
"""

text_embedder = JinaTextEmbedder(api_key=jina_api_key, model="jina-embeddings-v2-base-en")
text_embedder = JinaTextEmbedder(model="jina-embeddings-v2-base-en")
generator = HuggingFaceTGIGenerator("mistralai/Mixtral-8x7B-Instruct-v0.1")
generator.warm_up()

Expand Down

0 comments on commit 4450830

Please sign in to comment.