What type is returned for:
res = query_engine.query("My foobar?")
As a non-python dev, decided to do a quick restfyk API for llama index using fastapi.
def query(question: Union[str, None] = None):
...
return { "answer": res }
π This causes an error
ERROR: Exception in ASGI application
, which I believe is related to the fn query return type as tested by hard typing "some random text" as
res
.
Did a quick check by doing a print for res
Where I can assert a valid text response. Does anyone know what I need to look at?