Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

@kaustubh-cf

Description

@kaustubh-cf

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!

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions