TextSummary {chatAI4R}R Documentation

Summarize Long Text

Description

This function summarizes a long text using LLM. The development of this function started with the idea that it might be interesting to perform a copy-and-paste, sentence summarization and aims to be an evangelist for copy-and-paste LLM execution. It is recommended to run this function with GPT-4, but it is not cost effective and slow. This is still an experimental feature.

Usage

TextSummary(
  text = clipr::read_clip(),
  nch = 2000,
  verbose = TRUE,
  returnText = FALSE
)

Arguments

text

A character vector containing the text to be summarized. If not provided, the function will attempt to read from the clipboard.

nch

Integer specifying the number of characters at which to split the input text for processing.

verbose

A logical flag to print the message. Default is TRUE.

returnText

A logical flag to return summarized text results. Default is FALSE.

Details

Summarize Long Text

Value

The summarized text is placed into the clipboard and the function returns the result of clipr::write_clip.

Author(s)

Satoshi Kume

Examples

## Not run: 
TextSummary(text = c("This is a long text to be summarized.",
                     "It spans multiple sentences and goes into much detail."),
            nch = 10)

## End(Not run)

[Package chatAI4R version 0.2.10 Index]