Skip to content

Commit

Permalink
Adds integrating section
Browse files Browse the repository at this point in the history
  • Loading branch information
edgararuiz committed Apr 5, 2024
1 parent 5f4fc7b commit bddad6e
Showing 1 changed file with 20 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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

1 comment on commit bddad6e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.