-
Notifications
You must be signed in to change notification settings - Fork 160
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
text
computed property handle mixed-parts responses (#165)
- Loading branch information
1 parent
74f6d8b
commit 7afcf89
Showing
4 changed files
with
119 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
Tests/GoogleAITests/GenerateContentResponses/unary-success-function-call-mixed-content.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"candidates": [ | ||
{ | ||
"content": { | ||
"parts": [ | ||
{ | ||
"text": "The sum of [1, 2," | ||
}, | ||
{ | ||
"functionCall": { | ||
"name": "sum", | ||
"args": { | ||
"y": 1, | ||
"x": 2 | ||
} | ||
} | ||
}, | ||
{ | ||
"text": "3] is" | ||
}, | ||
{ | ||
"functionCall": { | ||
"name": "sum", | ||
"args": { | ||
"y": 3, | ||
"x": 3 | ||
} | ||
} | ||
} | ||
], | ||
"role": "model" | ||
}, | ||
"finishReason": "STOP", | ||
"index": 0 | ||
} | ||
] | ||
} |
40 changes: 40 additions & 0 deletions
40
Tests/GoogleAITests/GenerateContentResponses/unary-success-function-call-parallel-calls.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
{ | ||
"candidates": [ | ||
{ | ||
"content": { | ||
"parts": [ | ||
{ | ||
"functionCall": { | ||
"name": "sum", | ||
"args": { | ||
"y": 1, | ||
"x": 2 | ||
} | ||
} | ||
}, | ||
{ | ||
"functionCall": { | ||
"name": "sum", | ||
"args": { | ||
"y": 3, | ||
"x": 4 | ||
} | ||
} | ||
}, | ||
{ | ||
"functionCall": { | ||
"name": "sum", | ||
"args": { | ||
"y": 5, | ||
"x": 6 | ||
} | ||
} | ||
} | ||
], | ||
"role": "model" | ||
}, | ||
"finishReason": "STOP", | ||
"index": 0 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters