Find answers from the community

Updated 3 months ago

πŸ““ Llama-Index Quickstart - πŸ¦‘ TruLens

Hi, has anyone managed to get TruLens to work with llamaIndex?
I keep running into the same issue when running even their quickstart docs example. This error
Plain Text
---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)
Cell In[20], line 2
      1 # or as context manager
----> 2 with tru_query_engine_recorder as recording:
      3     query_engine.query("What did the author do growing up?")

File c:\Users\TurnerZ\Documents\GitHub\amaliai-hr\.venv\Lib\site-packages\trulens_eval\app.py:842, in App.__exit__(self, exc_type, exc_value, exc_tb)
    839 self.recording_contexts.reset(ctx.token)
    841 if exc_type is not None:
--> 842     raise exc_value
    844 return

Cell In[20], line 3
      1 # or as context manager
      2 with tru_query_engine_recorder as recording:
----> 3     query_engine.query("What did the author do growing up?")

File c:\Users\TurnerZ\Documents\GitHub\amaliai-hr\.venv\Lib\site-packages\trulens_eval\instruments.py:633, in Instrument.tracked_method_wrapper.<locals>.tru_wrapper(*args, **kwargs)
    625 @functools.wraps(func)
    626 def tru_wrapper(*args, **kwargs):
    627     logger.debug(
    628         f"{query}: calling instrumented sync method {func} of type {type(func)}, "
    629         f"iscoroutinefunction={is_really_coroutinefunction(func)}, "
    630         f"isasyncgeneratorfunction={inspect.isasyncgenfunction(func)}"
...
--> 267         result = coro.send(None)
    268     else:
    269         result = coro.throw(exc)

RuntimeError: cannot reuse already awaited coroutine


the docs: https://www.trulens.org/trulens_eval/llama_index_quickstart/
1
L
T
J
10 comments
I think trulens needs to be updated to work with v0.10.x (I could be wrong)

We have a slack channel with them, I'll pass this along
sure thing, please let me know if anything comes of it πŸ™‚
I see a few unsolved issues in their github repo, but none relating to the above. I'll create an issue as well for this
oh i also went and created it lol, i'll delete my issue then
hahaha all good
Thanks @Turner and @Logan M - taking a look at this
@Turner - btw, can you share your python version?
Hi all. We are still working on updating trulens to work with llama_index >= 0.10 so that is probably the source of the error.
Add a reply
Sign up and join the conversation on Discord