Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix chat_databricks() failures due to S7 validation.
Previously calling `chat_databricks()` would yield: Error: ! <elmer::ProviderOpenAI> object properties are invalid: - @api_key must be a single string, not an empty character vector. Hide Traceback ▆ 1. └─elmer::chat_databricks(...) 2. └─elmer:::ProviderDatabricks(...) at elmer/R/provider-databricks.R:58:3 3. ├─S7::new_object(...) 4. └─elmer:::ProviderOpenAI(...) 5. └─S7::new_object(...) 6. └─S7::validate(object, recursive = !parent_validated) This is because the default value for `api_key` is `character(0)`, not `""`. I didn't catch this until I updated my local development packages and started seeing the error. This commit fixes this by passing `api_key` explicitly. It also ensures that at least one Databricks unit test will run even when no credentials are available, which would have caught this earlier. Signed-off-by: Aaron Jacobs <[email protected]>
- Loading branch information