Thank you very much - so best step would probably to make a wrapper class / custom class similar to the ContextChatEngine to be able to make a chat / stream_chat method with the required changes. Maybe I don't see the obvious way. I get the retrieved_nodes / reranked_nodes by calling it like this:
retrieved_nodes = chat_engine._retriever.retrieve(condensed_question)
rerank_processors = [processor for processor in chat_engine._node_postprocessors if isinstance(processor, SentenceTransformerRerank)]
if (len(rerank_processors) > 0):
retrieved_nodes = rerank_processors[0]._postprocess_nodes(retrieved_nodes, condensed_question)
But I would still have to integrate the whole context_str_template stuff / prefix_messages that happens in the chat / stream_chat methods of the ContextChatEngine class