Introduction to PacketLLM

Introduction

PacketLLM is an RStudio gadget for AI-assisted development. It runs in the Viewer pane and connects to an AI backend, giving you a chat interface without leaving RStudio.

With PacketLLM, you can: - Generate code and explanations. - Analyze text from uploaded files (.R, .pdf, .docx). - Manage multiple conversations in tabs. - Customize model behavior through settings.

This vignette will guide you through the essential setup and basic usage.

Prerequisites: API Key

PacketLLM requires an API key set in your environment.

Installation

Install PacketLLM from CRAN:

install.packages("PacketLLM")

Development version from GitHub:

# install.packages("remotes")
remotes::install_github("AntoniCzolgowski/PacketLLM")

Launching the Chat Gadget

Once installed and your API key is set, launch the gadget from the R console:

library(PacketLLM)
run_llm_chat_app()

This command should be executed in an interactive RStudio session.

Understanding the Interface

The PacketLLM interface consists of:

Basic Workflow

  1. Launch the App: Run run_llm_chat_app().
  2. Start Chatting: Type your question or prompt.
  3. Send Message: Click the Send button.
  4. Wait for Response: The app will show a processing indicator while waiting for the model’s reply.

Optional steps: - Add File Context: Click the + button to attach files before sending. - Start a New Conversation: Click New Conversation for a fresh session. - Adjust Settings: Use Settings to change model options before sending the first message.

Exploring Further

Experiment with different models, system prompts, and file attachments to enhance your workflow with PacketLLM. For issues or suggestions, please visit the GitHub Issues page.