Skip to content

Commit

Permalink
Add tool and toolConfig to createModelWithBaseUri() (#137)
Browse files Browse the repository at this point in the history
Allow forwarding from the Vertex model constructor.
  • Loading branch information
cynthiajoan authored Apr 29, 2024
1 parent 467d8c1 commit 8f6bb83
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions pkgs/google_generative_ai/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## 0.3.3-wip

## 0.3.2

- Use API version `v1beta` by default.
Expand Down
6 changes: 4 additions & 2 deletions pkgs/google_generative_ai/lib/src/model.dart
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,9 @@ GenerativeModel createModelWithBaseUri({
FutureOr<Map<String, String>> Function()? requestHeaders,
List<SafetySetting> safetySettings = const [],
GenerationConfig? generationConfig,
List<Tool>? tools,
Content? systemInstruction,
ToolConfig? toolConfig,
}) =>
GenerativeModel._withClient(
client: HttpApiClient(apiKey: apiKey, requestHeaders: requestHeaders),
Expand All @@ -352,6 +354,6 @@ GenerativeModel createModelWithBaseUri({
generationConfig: generationConfig,
baseUri: baseUri,
systemInstruction: systemInstruction,
tools: null,
toolConfig: null,
tools: tools,
toolConfig: toolConfig,
);
2 changes: 1 addition & 1 deletion pkgs/google_generative_ai/lib/src/version.dart
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@
// See the License for the specific language governing permissions and
// limitations under the License.

const packageVersion = '0.3.2';
const packageVersion = '0.3.3-wip';
2 changes: 1 addition & 1 deletion pkgs/google_generative_ai/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: google_generative_ai
# Update `lib/version.dart` when changing version.
version: 0.3.2
version: 0.3.3-wip
description: >-
The Google AI Dart SDK enables developers to use Google's state-of-the-art
generative AI models (like Gemini).
Expand Down

0 comments on commit 8f6bb83

Please sign in to comment.