R Under development (unstable) (2024-12-07 r87428 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > # This file is part of the standard setup for testthat. > # It is recommended that you do not modify it. > # > # Where should you do additional test configuration? > # Learn more about the roles of various files in: > # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview > # * https://testthat.r-lib.org/articles/special-files.html > > library(testthat) > library(tidyllm) Attaching package: 'tidyllm' The following object is masked from 'package:stats': embed > > test_check("tidyllm") [ FAIL 2 | WARN 0 | SKIP 0 | PASS 211 ] ══ Failed tests ════════════════════════════════════════════════════════════════ ── Error ('test_api_openai.R:140:5'): tidyllm_schema() handles single element correctly ── Error in ``method(get_api_key, tidyllm::APIProvider)`(api = , ...)`: API key is not set. Please set it with: Sys.setenv(OPENAI_API_KEY = "YOUR-KEY-GOES-HERE"). Backtrace: ▆ 1. ├─httptest2::with_mock_dir(...) at test_api_openai.R:131:3 2. │ ├─httptest2:::with_mock_path(...) 3. │ │ └─base::eval.parent(expr) 4. │ │ └─base::eval(expr, p) 5. │ └─httptest2::with_mock_api(expr) 6. │ └─base::eval.parent(expr) 7. │ └─base::eval(expr, p) 8. ├─... %>% get_metadata() at test_api_openai.R:140:5 9. ├─tidyllm::get_metadata(.) 10. │ ├─tidyllm:::validate_inputs(...) 11. │ │ └─base::lapply(...) 12. │ └─S7::S7_inherits(.llm, LLMMessage) 13. ├─tidyllm::chat(...) 14. │ └─rlang::eval_tidy(modified_call) 15. └─tidyllm::openai(...) 16. ├─base::do.call(function_map[[.called_from]], args) 17. └─tidyllm (local) ``(.llm = ``, .json_schema = ``) 18. └─tidyllm:::get_api_key(api_obj, .dry_run) 19. ├─S7::S7_dispatch() 20. └─tidyllm (local) `method(get_api_key, tidyllm::APIProvider)`(api = ``, ...) 21. └─rlang::abort(...) ── Error ('test_api_openai.R:160:5'): tidyllm_schema() handles multiple elements correctly ── Error in ``method(get_api_key, tidyllm::APIProvider)`(api = , ...)`: API key is not set. Please set it with: Sys.setenv(OPENAI_API_KEY = "YOUR-KEY-GOES-HERE"). Backtrace: ▆ 1. ├─httptest2::with_mock_dir(...) at test_api_openai.R:150:3 2. │ ├─httptest2:::with_mock_path(...) 3. │ │ └─base::eval.parent(expr) 4. │ │ └─base::eval(expr, p) 5. │ └─httptest2::with_mock_api(expr) 6. │ └─base::eval.parent(expr) 7. │ └─base::eval(expr, p) 8. ├─... %>% get_metadata() at test_api_openai.R:160:5 9. ├─tidyllm::get_metadata(.) 10. │ ├─tidyllm:::validate_inputs(...) 11. │ │ └─base::lapply(...) 12. │ └─S7::S7_inherits(.llm, LLMMessage) 13. ├─tidyllm::chat(...) 14. │ └─rlang::eval_tidy(modified_call) 15. └─tidyllm::openai(...) 16. ├─base::do.call(function_map[[.called_from]], args) 17. └─tidyllm (local) ``(.llm = ``, .json_schema = ``) 18. └─tidyllm:::get_api_key(api_obj, .dry_run) 19. ├─S7::S7_dispatch() 20. └─tidyllm (local) `method(get_api_key, tidyllm::APIProvider)`(api = ``, ...) 21. └─rlang::abort(...) [ FAIL 2 | WARN 0 | SKIP 0 | PASS 211 ] Error: Test failures Execution halted