Skip to content

Commit

Permalink
fix example with ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
AlistairLR112 committed Jan 4, 2024
1 parent d528b91 commit 046cb08
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions integrations/ollama/example/example.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
from haystack import Pipeline
from haystack.components.builders.prompt_builder import PromptBuilder
from haystack.components.retrievers import InMemoryBM25Retriever
from haystack.document_stores import InMemoryDocumentStore
from haystack.components.builders.prompt_builder import PromptBuilder

from ollama_haystack import OllamaGenerator

template = """
Given the following information, answer the question.
Context:
Context:
{% for document in documents %}
{{ document.content }}
{% endfor %}
Expand All @@ -20,7 +20,7 @@

pipe.add_component("retriever", InMemoryBM25Retriever(document_store=document_store))
pipe.add_component("prompt_builder", PromptBuilder(template=template))
pipe.add_component("llm", OllamaGenerator(model='orca-mini'))
pipe.add_component("llm", OllamaGenerator(model="orca-mini"))
pipe.connect("retriever", "prompt_builder.documents")
pipe.connect("prompt_builder", "llm")

Expand Down

0 comments on commit 046cb08

Please sign in to comment.