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

Switch to langchain #53

Open
6 of 9 tasks
Yiannis128 opened this issue Jun 16, 2023 · 9 comments
Open
6 of 9 tasks

Switch to langchain #53

Yiannis128 opened this issue Jun 16, 2023 · 9 comments
Assignees
Labels
enhancement New feature or request mega This issue tracks other issues research This issue isn't being worked on, it is being considered, and researched.

Comments

@Yiannis128
Copy link
Collaborator

Yiannis128 commented Jun 16, 2023

Consider switching to langchain. Need to consider the positives and negatives. This requires some replacement of the backend, specifically in the BaseChatInterface class.

Requirements

@Yiannis128 Yiannis128 added enhancement New feature or request research This issue isn't being worked on, it is being considered, and researched. labels Jun 16, 2023
@Yiannis128 Yiannis128 self-assigned this Jun 22, 2023
@Yiannis128 Yiannis128 pinned this issue Jun 23, 2023
@krrishdholakia
Copy link

Hey @Yiannis128 cool repo - curious, why switch to Langchain? was it to support Falcon?

@Yiannis128
Copy link
Collaborator Author

Hey @Yiannis128 cool repo - curious, why switch to Langchain? was it to support Falcon?

Hi, short answer: yes. Slightly longer answer is that it will also allow for easily adding other types of LLMs such as Google PaLM that all have different APIs. Langchain makes the issue of designing, implementing, and testing a custom interface go away.

The transition is mostly complete, with only a slight set of features left to achieve feature parity with pre-langchain ESBMC-AI.

@krrishdholakia
Copy link

Curious - would this have helped - https://github.com/BerriAI/litellm?

@Yiannis128
Copy link
Collaborator Author

Curious - would this have helped - https://github.com/BerriAI/litellm?

Nice suggestion, I will have to check it out. The current implementation of LangChain is very generic (only uses API calls for completions), so, in theory, I could replace the LangChain support with LiteLLM.

I would have to see if:

  • LiteLLM is developed and supported regularly—wouldn't want to switch to something that is not going to be updated in the future.
  • Does it contain a good API with features, LangChain is OK for this, so switching would only occur if the features offered are better.
  • Is it worth it? If it's more lightweight, then maybe...

@krrishdholakia
Copy link

Any specific features you're looking for / problem you're facing with current implementation? Happy to submit a PR to help out here 😊

@Yiannis128
Copy link
Collaborator Author

Yiannis128 commented Aug 25, 2023

Hello, sorry for the late reply. I am looking for easy interop between the different APIs, along with the following:

  • Current context length measurements
  • Compatibility with the newest models (makes it easier to add them into ESBMC-AI).

Currently, langchain is doing fine, however, please keep me informed :)

@krrishdholakia
Copy link

krrishdholakia commented Aug 26, 2023

Hey @Yiannis128,

No worries. I went through the code and here's what I understand:

  • You currently support OpenAI + Huggingface Text Gen API (falcon + starcoder).
  • For Huggingface Text Gen API you have some logic for translating I/O before/after making the call

How do you expect users to make the call to falcon-7b or starcoder? would they have to deploy it themselves via huggingface inference api before using esbmc? both falcon-7b and starcoder are available pretty easily (1-click deploy) on other providers - e..g Baseten which also offers free credit

@krrishdholakia
Copy link

krrishdholakia commented Aug 26, 2023

@Yiannis128
Copy link
Collaborator Author

Yiannis128 commented Aug 26, 2023

Hey @Yiannis128,

No worries. I went through the code and here's what I understand:

  • You currently support OpenAI + Huggingface Text Gen API (falcon + starcoder).
  • For Huggingface Text Gen API you have some logic for translating I/O before/after making the call

Yeah that's right, as the hugging face API is more generic due to the diverse amount of models it supports.

How do you expect users to make the call to falcon-7b or starcoder? would they have to deploy it themselves via huggingface inference api before using esbmc? both falcon-7b and starcoder are available pretty easily (1-click deploy) on other providers - e..g Baseten which also offers free credit

No need to use one click deploy for some models. The ones built-in to ESBMC-AI make calls to hugging face servers, as they're hosted free of charge. The only thing users need to provide is an API key for hugging face, as stated in the documentation.

Larger models as well as private models need to be added through the config as custom AI models that are hosted elsewhere.

@Yiannis128 Yiannis128 added the mega This issue tracks other issues label Oct 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request mega This issue tracks other issues research This issue isn't being worked on, it is being considered, and researched.
Projects
None yet
Development

No branches or pull requests

2 participants