Skip to content

Commit f3a9721

Browse files
authored
Better docs for api_args (#101)
And actually use `extra_args` in gemini
1 parent a93ce58 commit f3a9721

File tree

9 files changed

+19
-17
lines changed

9 files changed

+19
-17
lines changed

R/provider-gemini.R

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,13 @@ method(chat_request, ProviderGemini) <- function(provider,
8484

8585
contents <- gemini_contents(turns)
8686
tools <- gemini_tools(tools)
87+
extra_args <- utils::modifyList(provider@extra_args, extra_args)
8788

8889
body <- compact(list(
8990
contents = contents,
9091
tools = tools,
91-
systemInstruction = system
92+
systemInstruction = system,
93+
!!!extra_args
9294
))
9395
req <- req_body_json(req, body)
9496

R/provider-openai.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ NULL
2828
#' choosing a model for all but the most casual use.
2929
#' @param seed Optional integer seed that ChatGPT uses to try and make output
3030
#' more reproducible.
31-
#' @param api_args Named list of arbitrary extra arguments passed to every
32-
#' chat API call.
31+
#' @param api_args Named list of arbitrary extra arguments appended to the body
32+
#' of every chat API call.
3333
#' @param echo One of the following options:
3434
#' * `none`: don't emit any output (default when running in a function).
3535
#' * `text`: echo text output as it streams in (default when running at

man/chat_claude.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_gemini.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_github.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_groq.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_ollama.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_openai.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/chat_perplexity.Rd

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)