Replies: 1 comment
-
Hi @Laxmi530, I think the functionality you're looking for is Shaper rather than customizing the Retriever. Shaper comes with different functions to convert data in a form you would need for PromptNode to function correctly. shaper = Shaper(func="join_documents", inputs={"documents": "documents"}, outputs=["documents"])
retriever = EmbeddingRetriever(document_store=document_store, embedding_model="sentence-transformers/multi-qa-mpnet-base-dot-v1")
node = PromptNode("text-davinci-003", default_prompt_template="question-answering", api_key="xxxxxxxx")
pipe = Pipeline()
pipe.add_node(component=retriever, name="retriever", inputs=["Query"])
pipe.add_node(component=shaper, name="shaper", inputs=["retriever"])
pipe.add_node(component=node, name="prompt_node", inputs=["shaper"])
output = pipe.run(query="what is the name of the player", params={"retriever": {"top_k": 5}}, debug=True)
output["results"] |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am getting error in retriever, also tried several techniques but unable to process further I am stuck in the retriever. I used the below code. Can some one please help me.
Thanks in advance.
This is the error i am getting
Beta Was this translation helpful? Give feedback.
All reactions