From bddad6e6f05efb1b4e3e62f495242884e99a2998 Mon Sep 17 00:00:00 2001 From: Edgar Ruiz Date: Fri, 5 Apr 2024 17:08:02 -0500 Subject: [PATCH] Adds integrating section --- .../chat-with-llms-using-chattr.Rmd | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/_posts/2024-04-04-chat-with-llms-using-chattr/chat-with-llms-using-chattr.Rmd b/_posts/2024-04-04-chat-with-llms-using-chattr/chat-with-llms-using-chattr.Rmd index 4cc55418..c43d8b3f 100644 --- a/_posts/2024-04-04-chat-with-llms-using-chattr/chat-with-llms-using-chattr.Rmd +++ b/_posts/2024-04-04-chat-with-llms-using-chattr/chat-with-llms-using-chattr.Rmd @@ -50,8 +50,27 @@ selected model, and makes it available to start chatting with it. To get started, you need to install LlamaGPTJ-chat, and download a compatible model. More detailed instructions are found [here](https://mlverse.github.io/chattr/articles/backend-llamagpt.html#installation). - ## Integrating with `chattr` +The idea for `chattr` is to make it easier for new LLM APIs to be added. `chattr` +is basically split in two sections, the user-interface (Shiny app and +`chattr()` function), and the included back-ends (GPT, Copilot, LLamaGPT). +New back-ends do not need to be added directly in `chattr`. If you are a package +developer, and would like to take advantage of `chattr` UI, you will only +need to include a `ch_submit()` method in your package. + +The two output requirements for `ch_submit()` are: + +- As the final return value, send the full response from the model you are +integrating into `chattr` + +- If streaming (`stream` is TRUE), output the current output as it is occurring. +Generally through a `cat()` function call. + +For more detail, please visit the function's reference page, link +[here](https://mlverse.github.io/chattr/reference/ch_submit.html). + + + ## Next steps