I am getting this error while trying intiliaze FlashrankRerank
PydanticUserError: FlashrankRerank is not fully defined; you should define Ranker, then call FlashrankRerank.model_rebuild()
This is my code
compressor = FlashrankRerank()
compression_retriever = ContextualCompressionRetriever(
base_compressor=compressor, base_retriever=retriever
)
I tried compressor = FlashrankRerank.model_rebuild()
But got this error
PydanticUndefinedAnnotation: name 'Ranker' is not defined