Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions python/mall/llmvec.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ def summarize(self, x, max_words=10, additional="") -> list:
use=self._use,
)

summarise = summarize

def translate(self, x, language="", additional="") -> list:
"""Translate text into another language.

Expand Down
2 changes: 2 additions & 0 deletions python/mall/polars.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,8 @@ def summarize(
)
return df

summarise = summarize

def translate(
self,
col,
Expand Down
1 change: 1 addition & 0 deletions r/NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export(llm_classify)
export(llm_custom)
export(llm_extract)
export(llm_sentiment)
export(llm_summarise)
export(llm_summarize)
export(llm_translate)
export(llm_use)
Expand Down
6 changes: 6 additions & 0 deletions r/R/llm-summarize.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#'
#' @description
#' Use a Large Language Model (LLM) to summarize text
#'
#' `llm_summarize()` and `llm_summarise()` are synonyms.
#'
#' @inheritParams llm_classify
#' @param max_words The maximum number of words that the LLM should use in the
Expand Down Expand Up @@ -44,6 +46,10 @@ llm_summarize <- function(.data,
UseMethod("llm_summarize")
}

#' @rdname llm_summarize
#' @export
llm_summarise <- llm_summarize

#' @export
llm_summarize.data.frame <- function(.data,
col,
Expand Down
11 changes: 11 additions & 0 deletions r/man/llm_summarize.Rd

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