-
Notifications
You must be signed in to change notification settings - Fork 0
Add geo_chat() function for AI-powered GEO metadata exploration #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: ShixiangWang <25057508+ShixiangWang@users.noreply.github.com>
|
@copilot 进行实际的代码测试,可以使用miniconda 安装 r 和依赖包,以及 cargo/rust https://www.anaconda.com/docs/getting-started/miniconda/install#linux-terminal-installer |
Completed comprehensive testing using miniconda with R 4.5.2 and Rust 1.92.0. Test Results: 10/10 tests passed (100% success rate) Verified functionality:
The implementation is working correctly and ready for use. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Added 'geo_cache' to .gitignore and .Rbuildignore to prevent caching files from being tracked. Introduced man/geo_chat.Rd documentation for the geo_chat() function. Updated the geo-chat vignette with usage examples, warnings, and sample outputs for both OpenAI and OpenAI-compatible providers.
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Adds
geo_chat()to enable natural language interaction with GEO metadata via theellmerpackage. Users can query, filter, and explore datasets through AI-powered conversation.Implementation
R/geo-chat.R: Core function with auto-detection of available AI providers (OpenAI, Anthropic, Google Gemini)
build_geo_context(): Generates structured metadata context with column info, sample data, and optional statisticsget_default_provider()/can_use_provider(): Auto-selects configured provider based on environment variablescheck_installed_ellmer(): Validates optional dependencyDESCRIPTION: Added
ellmerandwithrto Suggeststests/testthat/test-geo-chat.R: Validation for input types, provider configuration, context building, and summary generation
vignettes/geo-chat.Rmd: Setup guide, provider examples, and workflow integration
NAMESPACE: Export for
geo_chat()Usage
Configuration
Supports custom context size, summary control, and additional system prompts:
Original prompt
Feature: Add
geo_chat()function for AI-powered GEO metadata explorationOverview
Add a new function
geo_chat()that enables users to interactively explore GEO metadata tables using AI. This function integrates with theellmerpackage (https://github.com/tidyverse/ellmer) to provide natural language interaction capabilities.Implementation Details
1. New Function:
geo_chat()inR/geo-chat.RCreate a new file
R/geo-chat.Rwith the following functionality: