Relative Content

Tag Archive for pythonlangchain

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?

Did Not pickle ‘_thread.RLock’ object

TypeError Traceback (most recent call last)
Cell In[33], line 3
1 file_path=”vector_index.pkl”
2 with open(file_path, “wb”) as f:
—-> 3 pickle.dump(vectorindex_openai, f)