Find answers from the community

a
arda
Offline, last seen 3 months ago
Joined September 25, 2024
Has anyone ever used OpenInferenceCallbackHandler with condense_plus_context chat engine? In the log, the response text is the output of my DEFAULT_CONDENSE_PROMPT. However, in the chat menu, I see to the response to the system prompt.
5 comments
a
W
Hi, I am trying to use TokenCountingHandler with .as_chat_engine(...).astream_chat. I am getting 0 tokens as an outcome. I wonder if anyone ever faced (and hopefully solved this issue).

Token Counter:
token_counter = TokenCountingHandler( tokenizer=tiktoken.encoding_for_model('gpt-4').encode, verbose=False )
LLM:
AzureOpenAI(..., callback_manager= CallbackManager(token_counter])
5 comments
L
d
a