Repository: truera/trulens
Issue: TruLlama with query engine argument not working
Root cause: External Dependency Breakage

```
from llama_index.indices.postprocessor import SentenceTransformerRerank
from llama_index.retrievers import AutoMergingRetriever
from llama_index.query_engine import RetrieverQueryEngine

automerging_retriever = automerging_index.as_retriever(
    similarity_top_k=12,
)

retriever = AutoMergingRetriever(
    automerging_retriever, 
    automerging_index.storage_context, 
    verbose=True,
)

rerank = SentenceTransformerRerank(top_n=6, model="BAAI/bge-reranker-base")

from llama_index.prompts import PromptTemplate


qa_template = PromptTemplate(prompt_temp, template_var_mappings={"query_str": "question", "context_str": "context"})


auto_merging_engine = RetrieverQueryEngine.from_args(
    retriever=retriever, service_context=auto_merging_context, node_postprocessors=[rerank]
)
```

```
def get_prebuilt_trulens_recorder(query_engine, app_id):
    from trulens_eval import TruLlama
    
    bedrock = get_trulens_bedrock()
    
    qa_relevance = Feedback(bedrock.relevance_with_cot_reasons, name="Answer Relevance").on_input_output()

    feedbacks = [qa_relevance]
    
    tru_recorder = TruLlama(
        query_engine,
        app_id=app_id,
        feedbacks=feedbacks
    )
    return tru_recorder
```

```
from trulens_eval import Feedback, Tru

tru = Tru()

Tru().reset_database()

tru_recorder = get_prebuilt_trulens_recorder(
    auto_merging_engine,
    app_id ='app_0'
)
```

Output:

TypeError                                 Traceback (most recent call last)
Cell In[34], line 7
      3 tru = Tru()
      5 Tru().reset_database()
----> 7 tru_recorder = get_prebuilt_trulens_recorder(
      8     auto_merging_engine,
      9     app_id ='app_0'
     10 )

Cell In[33], line 10, in get_prebuilt_trulens_recorder(query_engine, app_id)
      6 qa_relevance = Feedback(bedrock.relevance_with_cot_reasons, name="Answer Relevance").on_input_output()
      8 feedbacks = [qa_relevance]
---> 10 tru_recorder = TruLlama(
     11     query_engine,
     12     app_id=app_id,
     13     feedbacks=feedbacks
     14 )
     15 return tru_recorder

File ~/Projects/src/lab_gra/fast_track/.venv/lib/python3.10/site-packages/trulens_eval/tru_llama.py:246, in TruLlama.__init__(self, app, **kwargs)
    243 kwargs['root_class'] = Class.of_object(app)  # TODO: make class property
    244 kwargs['instrument'] = LlamaInstrument(app=self)
--> 246 super().__init__(**kwargs)

File ~/Projects/src/lab_gra/fast_track/.venv/lib/python3.10/site-packages/trulens_eval/app.py:449, in App.__init__(self, tru, feedbacks, **kwargs)
    444 kwargs['feedbacks'] = feedbacks
    445 kwargs['recording_contexts'] = contextvars.ContextVar(
    446     "recording_contexts"
    447 )
--> 449 super().__init__(**kwargs)
    451 app = kwargs['app']
    452 self.app = app

File ~/Projects/src/lab_gra/fast_track/.venv/lib/python3.10/site-packages/trulens_eval/schema.py:579, in AppDefinition.__init__(self, app_id, tags, metadata, feedback_mode, app_extra_json, **kwargs)
    576 kwargs['metadata'] = {}
    577 kwargs['app_extra_json'] = app_extra_json or dict()
--> 579 super().__init__(**kwargs)
    581 if app_id is None:
    582     app_id = obj_id_of_obj(obj=self.model_dump(), prefix="app")

File ~/Projects/src/lab_gra/fast_track/.venv/lib/python3.10/site-packages/trulens_eval/utils/pyschema.py:666, in WithClassInfo.__init__(self, class_info, obj, cls, *args, **kwargs)
    662     class_info = Class.of_class(cls, with_bases=True)
    664 kwargs[CLASS_INFO] = class_info
--> 666 super().__init__(*args, **kwargs)

    [... skipping hidden 1 frame]

File ~/Projects/src/lab_gra/fast_track/.venv/lib/python3.10/site-packages/trulens_eval/utils/pyschema.py:628, in WithClassInfo.load(obj, *args, **kwargs)
    624 if k in obj:
    625     val = obj[k]
    627 if isinstance(typ, type) \
--> 628 and issubclass(typ, WithClassInfo) \
    629 and isinstance(val, dict) and CLASS_INFO in val:
    630     subcls = Class.model_validate(val[CLASS_INFO]).load()
    631     val = subcls.model_validate(val)

File ~/.pyenv/versions/3.10.6/lib/python3.10/abc.py:123, in ABCMeta.__subclasscheck__(cls, subclass)
    121 def __subclasscheck__(cls, subclass):
    122     """Override for issubclass(subclass, cls)."""
--> 123     return _abc_subclasscheck(cls, subclass)

**TypeError: issubclass() arg 1 must be a class**

I have already installed last version (0.20.1) and its not working well.





I get the same error with TruChain for the example in the documentation: https://www.trulens.org/trulens_eval/langchain_quickstart/#initialize-feedback-functions 

I think I have a solution here: https://github.com/truera/trulens/pull/770 . Can you try out (see instructions on installing from github in the main README.md).

Yes that fixed the issue for me! thanks! 

Documenting that this change was released in 0.20.1