Skip to content

Docs on using TypeChat with other LLMs #61

Closed

Description

What I understand is Typechat can be an alternative to lang chain library but in whole documentation I only see this being used for OpenAI's GPT Model only. So, is there any option to use this with any Open source model like LLAMA or Falcon ?

Activity

  1. DKFN commented on Jul 26, 2023

    @DKFN

    You can implement any TypeChatLanguageModel that satisfies the interface.
    It is not documented aside from the code source but if you need an example you can probably use my early Quivr implementation for typechat here as a reference:

    https://github.com/DKFN/quivr-typechat/blob/e1c68c2c5e9d9479386cf66f6b6438dcac32e05b/src/main.ts

    This is how I run typechat on my Quivr instance using GPT4All

    I hope this helps !

    EDIT: Reference exact commit sha and file. For now, the code is basic enough to be an example but it will become more complex in the future and may become confusing for ppl searching for examples.

  2. Underewarrr commented on Jul 26, 2023

    @Underewarrr

    You can implement any TypeChatLanguageModel that satisfies the interface. It is not documented aside from the code source but if you need an example you can probably use my early Quivr implementation for typechat here as a reference:

    https://github.com/DKFN/quivr-typechat/blob/e1c68c2c5e9d9479386cf66f6b6438dcac32e05b/src/main.ts

    This is how I run typechat on my Quivr instance using GPT4All

    I hope this helps !

    EDIT: Reference exact commit sha and file. For now, the code is basic enough to be an example but it will become more complex in the future and may become confusing for ppl searching for examples.

    Why not make some type of documentation for these steps ? I see as valuable resource!

    If complexity start getting bigger, documentation can be upgraded also!

  3. DKFN commented on Jul 26, 2023

    @DKFN

    Thanks Rafhael Oliveira (@Underewarrr) that is a great suggestion !

    I will start working on documentation about it after work

  4. DanielRosenwasser commented on Jul 26, 2023

    @DanielRosenwasser
    Member

    Hey all, we'll probably pursue some specific docs on plugging in a specific model.

    Until then, I've also put together a doc over at #65 which specifically points out TypeChatLanguageModel as something you can implement to make TypeChat work with any language model.

  5. changed the title [-]How to use it with any other open source LLM like LLAMA ?[/-] [+]Docs on using TypeChat with other LLMs[/+] on Jul 26, 2023
  6. DanielRosenwasser commented on Jul 27, 2023

    @DanielRosenwasser
    Member

    Speaking of which, there are at least 2 PRs (#34 and #55) which are entirely about adding a proxy to the built-in create*LanguageModel functions. Maybe we should include proxies in our documentation alongside plugging into specific language models.

    As an aside, over time I don't know how many external language models we will have "out-of-the-box" support for. We might opt to keep things as-is, add more support, or remove all the built-in helpers. Others on the team might feel differently.

  7. renambot commented on Aug 2, 2023

    @renambot

    DKFN (@DKFN) thanks for your example. It seems to work when adapting to Text Generation Inference (TGI) serving a Llama model.

  8. DKFN commented on Aug 2, 2023

    @DKFN

    Awesome! I am happy it worked for you :)
    I have dropped the documentation effort since Daniel mentionned works was already on the way for it.
    In the meantime, I am glad you found my little code useful :)

  9. robgruen commented on Oct 12, 2026

    @robgruen
    Contributor

    Closing the original documentation request as completed. Basic TypeScript Usage: Providing a Model now explains the bring-your-own-model contract. A model adapter implements TypeChatLanguageModel.complete; it does not need to use OpenAI. The current public interface describes the supported prompt shapes.

    The concrete Ollama walkthrough remains tracked in #183 rather than keeping this general missing-documentation request open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

DocumentationImprovements or additions to documentation

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions