bond

Bond is a framework to do useful things with large language models.

Bond exists because integrating an LLM into an application, a pipeline, or a Shiny app tends to demand more control than a convenience wrapper gives you. The code you write against bond is longer and more explicit than the equivalent ellmer code. In exchange you decide when a request is sent, when a tool runs, and what lands in the conversation history.

Installation

You can install the package from GitHub:

# install.packages("pak")
pak::pak("devOpifex/bond")

Example

library(bond)

chat <- Anthropic() |>
  add(MessageUser("What is the capital of France?"))

r <- send(chat)

print(r)

Documentation