Hi, how do you use
HuggingFaceTextGenInference
with
query_wrapper_prompt
?
The only way I can do it is to use the deprecated
LLMPredictor
llm = HuggingFaceTextGenInference(...)
query_wrapper_prompt = PromptTemplate("...")
llm_predictor = LLMPredictor(llm=llm, query_wrapper_prompt=query_wrapper_prompt)
This give the warning when used:
LLMPredictor is deprecated, please use LLM instead.
and still works for simple cases.
But
LLMPredictor
cant seem to work with
UnstructuredElementNodeParser
node_parser = UnstructuredElementNodeParser()
node_parser.llm = self.llm_predictor
Doing the above gives the error
ValueError: "LLMPredictor" object has no field "callback_manager"
Any advice please? Thanks