Find answers from the community

Updated last year

Hi is the langchaindemo missing? I get

At a glance
Hi is the langchaindemo missing? I get directed to this link when looking for examples with lagnchain but it seems like the link is deprecated https://github.com/run-llama/llama_index/blob/main/examples/langchain_demo/LangchainDemo.ipynb
L
A
15 comments
ah yea, we deleted that entire examples folder as it was all old/unmaintained examples

We should remove the link to that in the docs
Gotchu thanks. Is there an alternative we can use for that?
Are you just trying to use a query engine as a tool in langchain? Or?
Yes that's it. I am trying to pass it as a tool, then to query it using ConversationChain or ConversationalRetrievalChain. Is that possible?
Two options
  1. Create the QueryEngineTool in llamaindex, then convert it to a langchaint tool
Plain Text
from llama_index.tools import QueryEngineTool
tool = QueryEngineTool.from_defaults(query_engine, name="...", description="...")
lc_tool = tool.to_langchain_tool()


  1. I have a suspicion that the above might be broken at the moment. So the alternative is just putting the query engine in whatever class langchain uses for custom tools?
Plain Text
def my_tool(query_str):
  return query_engine.query(query_str)
Gotcha, I am trying to integrate memory + RAG into my LangChain chain tho it seems like impossible atm? Is it possible to pass memory to the query engine instead?
Thank you so much for responding by the way @Logan M
We have chat engines/agents as well that add memory.

You can quickly turn an index into a chat engine (there are a few chat modes, take note)
https://docs.llamaindex.ai/en/stable/module_guides/deploying/chat_engines/usage_pattern.html

You can also create an agent with access to many tools (if you are using openai/azure, definitely use the OpenAIAgent, otherwise, use the ReActAgent)
https://docs.llamaindex.ai/en/stable/module_guides/deploying/agents/root.html
Is it possible to pass in a ZepMemory directly from langchain.memory to LLaMaIndex chat engine? Or is there a port from that to the memory that chat engine accepts?
mmm no port currently
We've been meaning to expand our memory offerings
open to PRs of course πŸ™‚
I just directly sent it to ZEP Client. Do you want me to write a short example?
Got it working
Just send me the examples link where I can send a pr on the git repo
Add a reply
Sign up and join the conversation on Discord