Skip to content

Commit 41e9a7e

Browse files
authored
Merge pull request #115 from mlverse/updates
Appends https to DB Host if missing
2 parents c296963 + a42c5e9 commit 41e9a7e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: chattr
22
Title: Interact with Large Language Models in 'RStudio'
3-
Version: 0.1.0.9005
3+
Version: 0.1.0.9006
44
Authors@R: c(
55
person("Edgar", "Ruiz", , "[email protected]", role = c("aut", "cre")),
66
person(given = "Posit Software, PBC", role = c("cph", "fnd"))

R/backend-databricks.R

+6-1
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,15 @@ ch_databricks_complete <- function(prompt, defaults, stream = TRUE) {
3131
)
3232

3333
token <- ch_databricks_token(defaults)
34+
3435
host <- ch_databricks_host(defaults)
36+
host_url <- url_parse(host)
37+
if(is.null(host_url$scheme)) host_url$scheme <- "https"
38+
3539
user_agent <-paste0("chattr/", utils::packageVersion('chattr'))
3640

37-
req_result <- host %>%
41+
req_result <- host_url %>%
42+
url_build() %>%
3843
request() %>%
3944
req_url_path_append(defaults$path) %>%
4045
req_url_path_append(defaults$model) %>%

0 commit comments

Comments
 (0)