MyNixOS website logo
Description

Integrate 'OpenAI' Large Language Models into Your 'R' Workflows.

Utilizing the 'OpenAI' API as the back end (<https://platform.openai.com/docs/api-reference>), 'TheOpenAIR' offers 'R' wrapper functions for the 'ChatGPT' endpoint and several high-level functions that enable the integration of 'ChatGPT' capabilities in diverse data-related tasks, such as data cleansing and automated analytics script generation.

OpenAIR

Lifecycle: experimental R-CMD-check

Integrate OpenAI's GPT models into your R workflows.

Installation

You can install the development version of TheOpenAIR from GitHub with:

# install.packages("devtools")
devtools::install_github("umatter/OpenAIR")

Usage

To use the package, you'll need to have an OpenAI API key. You can sign up for an API key here. Once you have your API key, you can start using TheOpenAIR:

# load the package
library("TheOpenAIR")

# register your api key
openai_api_key("YOUR-API-KEY")

Then, you can start chatting with the model. The simplest way of interacting with ChatGPT is the chat()-function. Using it is essentially the same as interacting with ChatGPT via the web GUI (https://chat.openai.com/chat).

# use chat() to interact with ChatGPT through the R console
chat("Write a 100 words essay on why TheOpenAIR, 
an R package to integrate GPT models into your R workflows is fantastic. 
Write it in the style of product launches moderated by Steve Jobs.")
Ladies and gentlemen, let me introduce you to TheOpenAIR, the latest and greatest addition to the R community. Thanks to TheOpenAIR, you can now integrate the cutting-edge GPT models right into your R workflows, unlocking a world of possibilities for predictive modeling and natural language processing. Whether you're an experienced data scientist or a newcomer to the field, TheOpenAIR makes it easier than ever to create powerful models that generate high-quality text. From business applications to academic research, TheOpenAIR has the power to transform the way we work with language data. So what are you waiting for? Join the excitement and embrace the future of data science with TheOpenAIR!
chat("Now shorten the essay to 30 words.")
TheOpenAIR - unleash the full power of GPT models in R workflows.

chat() is primarily useful for interactive mode. For writing short scripts and developing functions based on TheOpenAIR, the infix function %c% provides an alternative syntax to send messages to the model and indicate what output format is required.

# output to console
"Remove all numeric characters from '5XC-2a09ujnap9o2q0MP'" %c% "message_to_console"
The string without numeric characters would be 'XC-aujnapqMP'.
# return the message as a string
resp <- 
"Remove all numeric characters from '5XC-2a09ujnap9o2q0MP'
In your response, only provide what remains from the string" %c%
"message" 

resp
[1] "XC-aujnapoqMP"

Code of Conduct

For information about our code of conduct, please see the Code of Conduct page.

Metadata

Version

0.1.0

License

Unknown

Platforms (77)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-windows
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows