Skip to content

Commit

Permalink
Fixes #72
Browse files Browse the repository at this point in the history
  • Loading branch information
edgararuiz committed Mar 15, 2024
1 parent ec84155 commit 0d477fc
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
10 changes: 5 additions & 5 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
6 changes: 3 additions & 3 deletions R/backend-openai-core.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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)) %>%
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion R/backend-openai-submit.R
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion R/chattr-test.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion inst/configs/copilot.yml
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 0d477fc

Please sign in to comment.