cofactoryai / textbase

✨ Textbase is a simple framework for building AI chatbots. ✨
https://textbase.ai
1.27k stars 355 forks source link

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

Open kaustubh-cf opened 11 months ago

kaustubh-cf commented 11 months ago

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

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

Docs

Let us know if you face any issues!

morgoth9808 commented 11 months ago

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

kaustubh-cf commented 11 months ago

Hi @morgoth9808 Yes, please go ahead with it!

morgoth9808 commented 11 months ago

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 commented 11 months ago

@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 commented 11 months ago

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

morgoth9808 commented 11 months ago

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.

kaustubh-cf commented 11 months ago

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 commented 9 months ago

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