Skip to content

Commit

Permalink
Fix typo
Browse files Browse the repository at this point in the history
And improve comments. Fixes #277
  • Loading branch information
hadley committed Jan 27, 2025
1 parent 99c015d commit 09f22d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/provider-gemini.R
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,11 @@ method(chat_request, ProviderGemini) <- function(provider,

req <- req_url_path_append(req, "models")
if (stream) {
# https://ai.google.dev/api/generate-content
# https://ai.google.dev/api/generate-content#method:-models.streamgeneratecontent
req <- req_url_path_append(req, paste0(provider@model, ":", "streamGenerateContent"))
req <- req_url_query(req, alt = "sse")
} else {
# https://ai.google.dev/api/generate-content#method:-models.streamgeneratecontent
# https://ai.google.dev/api/generate-content#method:-models.generatecontent
req <- req_url_path_append(req, paste0(provider@model, ":", "generateContent"))
}

Expand Down Expand Up @@ -109,7 +109,7 @@ method(chat_request, ProviderGemini) <- function(provider,
}
extra_args <- utils::modifyList(provider@extra_args, extra_args)

body <- compact(list(
body <- compact(list2(
contents = contents,
tools = tools,
systemInstruction = system,
Expand Down

0 comments on commit 09f22d5

Please sign in to comment.