You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Our AbstractLLM class is very useful, but also very limited in the scope of the previous Langchain's API version, to continue improving, we need to start adding features to our default AbstractLLM class or creating a new one that provides us the structure for Abstract LCEL.
The first attempt wasn't very well thought out on my part, @lgabs suggested a new structure that would contemplate a comprehensive way of having LCEL objects in the class and allow us to still maintain retro compatibility.
classAbstractLCELClass(AbstractLLM):
definit(self, *args, **kwargs):
passdefprocess(self, *args, **kwargs):
# calls chain through the invoke method from langchainpass@propertydefchain(self):
# chain as a property, compiles all of it here@propertydefretriver(self):
# retriever instancepass@propertydefmemory(self):
# memory instancepassdefinvoke(self, *args, **kwargs):
# calls the class process method that calls the original invokepass
The text was updated successfully, but these errors were encountered:
Our AbstractLLM class is very useful, but also very limited in the scope of the previous Langchain's API version, to continue improving, we need to start adding features to our default AbstractLLM class or creating a new one that provides us the structure for Abstract LCEL.
The first attempt wasn't very well thought out on my part, @lgabs suggested a new structure that would contemplate a comprehensive way of having LCEL objects in the class and allow us to still maintain retro compatibility.
The text was updated successfully, but these errors were encountered: