Skip to content

Commit

Permalink
Update test expectations
Browse files Browse the repository at this point in the history
  • Loading branch information
natebosch committed May 22, 2024
1 parent 9a79968 commit 1b68537
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions pkgs/google_generative_ai/test/generative_model_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ void main() {
),
);
expect(request, {
'model': 'models/$defaultModelName',
'contents': [
{
'role': 'user',
Expand Down Expand Up @@ -311,6 +312,7 @@ void main() {
),
);
expect(request, {
'model': 'models/$defaultModelName',
'contents': [
{
'role': 'user',
Expand Down Expand Up @@ -415,14 +417,17 @@ void main() {
),
);
expect(request, {
'contents': [
{
'role': 'user',
'parts': [
{'text': prompt},
],
},
],
'generateContentRequest': {
'model': 'models/$defaultModelName',
'contents': [
{
'role': 'user',
'parts': [
{'text': prompt},
],
},
],
}
});
},
response: {'totalTokens': 2},
Expand Down Expand Up @@ -460,7 +465,9 @@ void main() {
),
),
),
verifyRequest: (_, request) {
verifyRequest: (_, countTokensRequest) {
final request = countTokensRequest['generateContentRequest']
as Map<String, Object?>;
expect(request['safetySettings'], [
{
'category': 'HARM_CATEGORY_DANGEROUS_CONTENT',
Expand Down

0 comments on commit 1b68537

Please sign in to comment.