Relative Content

Tag Archive for pythonlangchain

Why the Langchain placeholder is not being called?

My goal is to insert the language placeholder into the invoke method but currently the response is always in english. I follow this tutorial -> https://python.langchain.com/v0.2/docs/tutorials/chatbot/

Langchain: How to switch models at the same time?

I am new to Langchain and essentially what I want to do is use a ‘Bring Your Own Knowledge’ agent which gets a dataframe, and use the LLM as is. However, I noticed that when I ask the agent generic questions, it won’t know the answer because it’s not in the dataframe… I would like to know how I could use both – something ‘multi-agent’ I guess.

Langchain: How to switch models at the same time?

I am new to Langchain and essentially what I want to do is use a ‘Bring Your Own Knowledge’ agent which gets a dataframe, and use the LLM as is. However, I noticed that when I ask the agent generic questions, it won’t know the answer because it’s not in the dataframe… I would like to know how I could use both – something ‘multi-agent’ I guess.

Callback attached to runnable runs multiple times

I am coding a backend server in python using lancgain and I need to attach a callback to track each time the chain has been run using track_feedback(). I am using the “callbacks” argument on the with_config() in the self.runnable. But it is getting triggered many times per runnable execution. Could the children chains be somehow inheriting the call?