Find answers from the community

Updated 2 years ago

gpt_index with langchain

At a glance
when i use gpt_index with create_llama_chat_agent, i find when i ask more questions, the token_counter query will not log, but when i just use index.query, the query log every times when ask question. Is there any different?
y
j
10 comments
@jerryjliu0 hi jerry,can you give me some help please
hi @yingying by token counter do you mean the object that prints the token usage when you do a query call?
yeah, when I use agent.run with chat-bot demo, i found only first question prints query token usage, but if I ask more thing, the agent answers me but the terminal doesn't print the [query] log, i am puzzled
I'm guessing that the query llm-call was not sent
ahhh so the query token usage is only printed if it uses llamaindex as a tool
since that part is part of our package
if it doesn't use llamaindex as a tool then it's just the agent itself with is part of langchain
Thx, i got it. But In the case that doesn't use llama-index, it should use llama-index because the question is about the knowledge indiced by llama-index, it confused my too
yeah maybe you could try tuning the agent description
Add a reply
Sign up and join the conversation on Discord