Find answers from the community

J
Jens
Offline, last seen 4 months ago
Joined September 25, 2024
J
Jens
·

Langchain

Hello 🙂 I've successfully built a whole unified query framework/interface, and it works great, but im having a really hard time integrating langchain agent into it for memory retention. the way it's set up in the chatbot tutorial do not work at all for the unified framework.
2 comments
L
I am completely stumped on following the "Unified Query" guide. Any help would be greatly appreciated! ❤️

I am running 0.6.5, following the /latest/ guide for Creating a Unified Query Framework

I have two issues:
  1. From the guide: root_index = graph.get_index(graph.index_struct.root_id, GPTSimpleKeywordTableIndex) fails as this function has no attribute 'root_id'. I can seemingly get around this by using root_index = graph.get_index(graph.index_struct.index_id), but this doesn't feel right.
  1. After then setting up the Graph, I try to run a query response = query_engine.query("how are you?"), which fails in a ZeroDivisionError: integer division or modulo by zero. (https://pastebin.com/24ja3G2t).
This is my code: https://github.com/jensbech/kazar-llama-index-chatbot/blob/v2/examples/paul_graham_essay/v2.py
3 comments
L
J