token_counter = TokenCountingHandler( tokenizer=tiktoken.encoding_for_model("gpt-3.5-turbo").encode )
encoding_for_model("local:BAAI/bge-base-en")
here?query_engine.query
in a try/except
will result in the callback successfully firing, even though the query fails?import traceback try: ... except Exception: traceback.print_exc()