Find answers from the community

Updated 10 months ago

@Logan M is it possible to use this

@Logan M is it possible to use this pipeline but with a chat.engine? I want to use this type of pipeline but i also want to have a memory

retriever = index.as_retriever(similarity_top_k=6)
summarizer = TreeSummarize(
service_context=ServiceContext.from_defaults(
llm=OpenAI(model="gpt-3.5-turbo")
)
)
reranker = CohereRerank()

p = QueryPipeline(verbose=True)
p.add_modules(
{
"input": InputComponent(),
"retriever": retriever,
"summarizer": summarizer,
}
)
p.add_link("input", "retriever")
p.add_link("input", "summarizer", dest_key="query_str")
p.add_link("retriever", "summarizer", dest_key="nodes")

output = p.run(input="MY QUESTION")

print(str(output))
r
L
4 comments
@Logan M 😦
its possible, but I don't have time to write the example at the moment
been meaning to do one
okay, thanks πŸ™‚
Add a reply
Sign up and join the conversation on Discord