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

LLM Integration: implement Claude 2.0 in models.py #155

Open
kaustubh-cf opened this issue Sep 28, 2023 · 8 comments
Open

LLM Integration: implement Claude 2.0 in models.py #155

kaustubh-cf opened this issue Sep 28, 2023 · 8 comments
Labels

Comments

@kaustubh-cf
Copy link
Contributor

kaustubh-cf commented Sep 28, 2023

What do we need?

If you go to the textbase/models.py, there exists classes for various models like OpenAI (GPT3.5/4), Dalle-2, Huggingface inference API etc that can be used for various tasks from text generation to chatbots and many more.

Claude 2.0 is another such promising LLM that we would very much like to integrate in textbase.

Just make another class in there like:

class Claude:
    def generate():
        pass
  • You can refer to the Python Client SDK mentioned in the documentation. Keep in mind that you might have to restructure the response in the format that textbase accepts. 👉🏻 Reference

Refer to the code in models.py, play around with it after setting things up locally.

  • After implementing the model, import that and test it by making a main.py, just like the one for OpenAI.
    Reference -> docs.textbase.ai

Docs

  • After writing the code make sure you update the corresponding docs as well in here.
  • Create a file named claude-bot.md and add relevant information there.

Let us know if you face any issues!

@kaustubh-cf kaustubh-cf changed the title LLM Integration: implement Claude 2.0 in models.py LLM Integration: implement Claude 2.0 in models.py Sep 28, 2023
@morgoth9808
Copy link

hey @kaus-cofactory , I want to work on this issue. Can you please assign this to me.

@kaustubh-cf
Copy link
Contributor Author

Hi @morgoth9808 Yes, please go ahead with it!

@morgoth9808
Copy link

Hey @kaus-cofactory I cannot create an api key for testing Claude 2.0. It is saying that I have to apply for the early access. Is there any workaround for that.

@kaustubh-cf
Copy link
Contributor Author

@morgoth9808 I'm afraid Claude is available only in the US and UK as of now. So it might be not possible to do this from your side. Although if you want to implement the tentative code, the internal team can then check it with an API key that we might get access to.

If not I'll be adding other issues, you can have a look at them 🙌🏻

@morgoth9808
Copy link

Thanks for the update @kaus-cofactory , I am implementing the tentative code.

@morgoth9808
Copy link

Hey @kaus-cofactory so I tried writing the code but I cannot test without an api key and I can't access Claude2 here in India. So I am exploring different projects now . Anyway thank you for assigning this issue to me , really learned a lot from this project.

@morgoth9808 morgoth9808 removed their assignment Sep 29, 2023
@kaustubh-cf
Copy link
Contributor Author

No worries @morgoth9808, this would be taken up by someone from the internal team probably. Thanks!

Over the course of Hacktoberfest we'll be adding a number of different issues. Feel free to have a look at the issues section anytime!

@ankitrout2903
Copy link

Hello project Maintainer I have tried to add the Claude api in the models the only issue I faced while development that I ddint have the api key for running purpose because it is not accesible But I have added the code you can review it. If you want can I push this code.? Give me as a assignee here

image Screenshot 2023-11-23 013501

ankitrout2903 added a commit to ankitrout2903/textbase that referenced this issue Nov 22, 2023
ankitrout2903 added a commit to ankitrout2903/textbase that referenced this issue Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants