Add geo_chat() function for AI-powered GEO metadata exploration#5
Add geo_chat() function for AI-powered GEO metadata exploration#5
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! |
|
@Yunuuuu 这个check下? |
|
刚看见王老师,我这几天看看 |
|
默认为什么不输入所有行数呢 |
|
‘provider’ 应该支持lambda语法 |
|
|
|
你可以自己改 嘿嘿。
---- 回复的原邮件 ----
发件人 Yun ***@***.***> 日期 2026年02月26日 12:20 收件人 ***@***.***> 抄送至 Shixiang Wang ***@***.***>***@***.***> 主题 Re: [WangLabCSU/geokit] Add geo_chat() function for AI-powered GEO metadata exploration (PR #5)
Yunuuuu left a comment (WangLabCSU/geokit#5)
provider 如果是函数的话,我们需要检查他返回的是一个chat object?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you were assigned.Message ID: ***@***.***>
|
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: