Skip to content

Commit

Permalink
keep GenerativeModel's original parameter positions (#115)
Browse files Browse the repository at this point in the history
It seems like the `tools` and `toolConfig` parameters were added before
`requestOptions`, which could cause a breaking change because in the
current version of the SDK the `RequestOptions` is in a different order
(right after `safetySettings`).

---------

Co-authored-by: Rodrigo Lazo <[email protected]>
  • Loading branch information
thatfiredev and rlazo authored Apr 9, 2024
1 parent 69b5610 commit 753cb33
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .changes/generativeai/beginner-car-club-airport.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"type":"MAJOR","changes":["Keep argument positions"]}
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ internal constructor(
apiKey: String,
generationConfig: GenerationConfig? = null,
safetySettings: List<SafetySetting>? = null,
requestOptions: RequestOptions = RequestOptions(),
tools: List<Tool>? = null,
toolConfig: ToolConfig? = null,
systemInstruction: Content? = null,
requestOptions: RequestOptions = RequestOptions(),
) : this(
modelName,
apiKey,
Expand Down

0 comments on commit 753cb33

Please sign in to comment.