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

Docs on using TypeChat with other LLMs #61

Open
pd-vt opened this issue Jul 26, 2023 · 7 comments
Open

Docs on using TypeChat with other LLMs #61

pd-vt opened this issue Jul 26, 2023 · 7 comments
Assignees
Labels
Documentation Improvements or additions to documentation

Comments

@pd-vt
Copy link

pd-vt commented Jul 26, 2023

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 ?

@DKFN
Copy link

DKFN commented Jul 26, 2023

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.

@Underewarrr
Copy link

Underewarrr commented Jul 26, 2023

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!

@DKFN
Copy link

DKFN commented Jul 26, 2023

Thanks @Underewarrr that is a great suggestion !

I will start working on documentation about it after work

@DanielRosenwasser
Copy link
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.

@DanielRosenwasser DanielRosenwasser added the Documentation Improvements or additions to documentation label Jul 26, 2023
@DanielRosenwasser DanielRosenwasser self-assigned this Jul 26, 2023
@DanielRosenwasser DanielRosenwasser changed the title How to use it with any other open source LLM like LLAMA ? Docs on using TypeChat with other LLMs Jul 26, 2023
@DanielRosenwasser
Copy link
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.

@renambot
Copy link

renambot commented Aug 2, 2023

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

@DKFN
Copy link

DKFN commented Aug 2, 2023

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

5 participants