Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve LCEL support through new Absctract class #191

Open
vmesel opened this issue May 18, 2024 · 1 comment
Open

Improve LCEL support through new Absctract class #191

vmesel opened this issue May 18, 2024 · 1 comment
Labels
devx enhancement New feature or request

Comments

@vmesel
Copy link
Member

vmesel commented May 18, 2024

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.

class AbstractLCELClass(AbstractLLM):
    def init(self, *args, **kwargs):
        pass

    def process(self, *args, **kwargs):
        # calls chain through the invoke method from langchain
        pass

    @property
    def chain(self):
        # chain as a property, compiles all of it here

    @property
    def retriver(self):
        # retriever instance
        pass

    @property
    def memory(self):
        # memory instance
        pass

    def invoke(self, *args, **kwargs):
        # calls the class process method that calls the original invoke
        pass
@avelino avelino added enhancement New feature or request devx labels May 24, 2024
@lgabs
Copy link
Contributor

lgabs commented Jun 1, 2024

This is been discussed in this PR in dialog-lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
devx enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants