Skip to contents

Chat with the Mistral api

stream

Usage

chat(..., model = "mistral-tiny", error_call = current_env())

stream(..., model = "mistral-tiny", error_call = current_env())

Arguments

...

messages, see as_messages().

model

which model to use. See models() for more information about which models are available.

error_call

The execution environment of a currently running function, e.g. caller_env(). The function will be mentioned in error messages as the source of the error. See the call argument of abort() for more information.

Value

A tibble with columns role and content with class chat_tibble

Examples


if (FALSE) {
  res <- chat("What are the top 5 R packages ?")
  res

  # use the result from a previous chat() to continue the
  # conversation
  chat(res, "Why do people love them so much ?")
}