diff --git a/NAMESPACE b/NAMESPACE index c2cc58e..3bf7834 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,19 +7,19 @@ S3method(ch_submit,ch_openai) S3method(ch_test,ch_llamagpt) S3method(ch_test,ch_openai_chat_completions) S3method(ch_test,ch_openai_completions) -S3method(ch_test,ch_openai_copilot_chat) +S3method(ch_test,ch_openai_github_copilot_chat) S3method(openai_completion,ch_openai_chat_completions) S3method(openai_completion,ch_openai_completions) -S3method(openai_completion,ch_openai_copilot_chat) +S3method(openai_completion,ch_openai_github_copilot_chat) S3method(openai_prompt,ch_openai) S3method(openai_prompt,ch_openai_completions) S3method(openai_request,ch_openai) -S3method(openai_request,ch_openai_copilot_chat) +S3method(openai_request,ch_openai_github_copilot_chat) S3method(openai_stream_content,ch_openai_chat_completions) S3method(openai_stream_content,ch_openai_completions) -S3method(openai_stream_content,ch_openai_copilot_chat) +S3method(openai_stream_content,ch_openai_github_copilot_chat) S3method(openai_token,ch_openai) -S3method(openai_token,ch_openai_copilot_chat) +S3method(openai_token,ch_openai_github_copilot_chat) S3method(print,ch_history) S3method(print,ch_model) S3method(print,ch_request) diff --git a/R/backend-openai-core.R b/R/backend-openai-core.R index 6fbb03e..aaf07cb 100644 --- a/R/backend-openai-core.R +++ b/R/backend-openai-core.R @@ -3,7 +3,7 @@ openai_token <- function(defaults = NULL, fail = TRUE) { } #' @export -openai_token.ch_openai_copilot_chat <- function(defaults = NULL, fail = TRUE) { +openai_token.ch_openai_github_copilot_chat <- function(defaults = NULL, fail = TRUE) { openai_token_copilot(defaults, fail) } @@ -85,7 +85,7 @@ openai_request.ch_openai <- function(defaults, req_body) { } #' @export -openai_request.ch_openai_copilot_chat <- function(defaults, req_body) { +openai_request.ch_openai_github_copilot_chat <- function(defaults, req_body) { defaults$path %>% request() %>% req_auth_bearer_token(openai_token(defaults = defaults)) %>% @@ -161,7 +161,7 @@ openai_stream_content.ch_openai_completions <- function(defaults, res) { } #' @export -openai_stream_content.ch_openai_copilot_chat <- function(defaults, res) { +openai_stream_content.ch_openai_github_copilot_chat <- function(defaults, res) { res %>% map(~ { content <- .x$choices$delta$content diff --git a/R/backend-openai-submit.R b/R/backend-openai-submit.R index 2892014..ccfd192 100644 --- a/R/backend-openai-submit.R +++ b/R/backend-openai-submit.R @@ -148,7 +148,7 @@ openai_completion.ch_openai_chat_completions <- function( } #' @export -openai_completion.ch_openai_copilot_chat <- function( +openai_completion.ch_openai_github_copilot_chat <- function( defaults, prompt, new_prompt, diff --git a/R/chattr-test.R b/R/chattr-test.R index 2f38cbb..e1ae722 100644 --- a/R/chattr-test.R +++ b/R/chattr-test.R @@ -84,7 +84,7 @@ ch_test.ch_llamagpt <- function(defaults = NULL) { # ----------------------------- Copilot ---------------------------------------- #' @export -ch_test.ch_openai_copilot_chat <- function(defaults = NULL) { +ch_test.ch_openai_github_copilot_chat <- function(defaults = NULL) { if (ch_debug_get()) { prompt <- "TEST" out <- "TEST" diff --git a/inst/configs/copilot.yml b/inst/configs/copilot.yml index 0c5e0cb..10b2c03 100644 --- a/inst/configs/copilot.yml +++ b/inst/configs/copilot.yml @@ -1,5 +1,5 @@ default: - provider: GitHub - Copilot Chat + provider: OpenAI - GitHub Copilot Chat path: https://api.githubcopilot.com/chat/completions include_history: TRUE max_data_files: 0