Skip to content

Commit

Permalink
Merge pull request #154 from calderonsamuel/fix-azure-path
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesHWade authored Nov 29, 2023
2 parents 5e8c2cf + c5d36c9 commit 6e57489
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@

- Reverted back to use an R6 class for OpenAI streaming. This doesn't affect how the users interact with the addins.
- Fixed a bug in retrieval of OpenAI models
- Fixed a bug in Azure OpenAI request formation.

# gptstudio 0.3.1

Expand Down
4 changes: 2 additions & 2 deletions R/azure-openai.R
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#'
#' @param prompt a list to use as the prompt for generating
#' completions
#' @param task a character string for the API task. Defaults to the Azure OpenAI
#' @param task a character string for the API task (e.g. "completions"). Defaults to the Azure OpenAI
#' task from environment variables if not specified.
#' @param base_url a character string for the base url. It defaults to the Azure
#' OpenAI endpoint from environment variables if not specified.
Expand Down Expand Up @@ -48,7 +48,7 @@ request_base_azure_openai <-
httr2::req_url_path_append("openai/deployments") %>%
httr2::req_url_path_append(deployment_name) %>%
httr2::req_url_path_append(task) %>%
httr2::req_url_path_append(api_version) %>%
httr2::req_url_query("api-version" = api_version) %>%
httr2::req_headers("api-key" = token,
"Content-Type" = "application/json") %>%
httr2::req_method("POST")
Expand Down
2 changes: 1 addition & 1 deletion man/create_completion_azure_openai.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6e57489

Please sign in to comment.