Skip to content
Discussion options

You must be logged in to vote

To resolve the FlashrankRerank error: "field 'client' not yet prepared so type is still a ForwardRef, you might need to call FlashrankRerank.update_forward_refs()", you need to call the update_forward_refs method on the FlashrankRerank class. This method resolves any forward references in the type annotations.

Here is how you can do it:

FlashrankRerank.update_forward_refs()

You should call this method after the class definition and before you instantiate or use the FlashrankRerank class. Here is an example of how to integrate it into your code:

from __future__ import annotations

from typing import TYPE_CHECKING, Dict, Optional, Sequence

from langchain_core.callbacks.manager import Call…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Jae-hoya
Comment options

Answer selected by eranault
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants