Skip to content

Commit

Permalink
import ellmer::chat_openai
Browse files Browse the repository at this point in the history
  • Loading branch information
romainfrancois committed Feb 9, 2025
1 parent 7eedb30 commit 201a7dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@

export(prompt)
export(roses)
importFrom(ellmer,chat_openai)
importFrom(glue,glue)
4 changes: 3 additions & 1 deletion R/roses.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
#' # to be set. Visit https://openai.com/api/
#' roses("dplyr")
#' }
#'
#' @importFrom ellmer chat_openai
#' @export
roses <- function(pkg, hint = "", emoji = TRUE, chat = ellmer::chat_openai(model = "gpt-3.5-turbo")) {
roses <- function(pkg, hint = "", emoji = TRUE, chat = chat_openai(model = "gpt-3.5-turbo")) {
prompt <- prompt(pkg, hint = hint, emoji = emoji)
chat$chat(prompt, echo = "text")
}
Expand Down
3 changes: 2 additions & 1 deletion man/roses.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 201a7dc

Please sign in to comment.