-
Notifications
You must be signed in to change notification settings - Fork 152
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Further async streaming testing (#48)
Includes cleanup, and moving to new naming conventions for tests.
- Loading branch information
1 parent
ee08a3c
commit f3d07ac
Showing
5 changed files
with
47 additions
and
97 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
Tests/GoogleAITests/GenerateContentResponses/streaming-failure-error-mid-stream.txt
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,17 @@ | ||
data: {"candidates": [{"content": {"parts": [{"text": "First "}]},"finishReason": "STOP","index": 0,"safetyRatings": [{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HATE_SPEECH","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS_CONTENT","probability": "NEGLIGIBLE"}]}],"promptFeedback": {"safetyRatings": [{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HATE_SPEECH","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS_CONTENT","probability": "NEGLIGIBLE"}]}} | ||
|
||
data: {"candidates": [{"content": {"parts": [{"text": "Second "}]},"finishReason": "STOP","index": 0,"safetyRatings": [{"category": "HARM_CATEGORY_SEXUALLY_EXPLICIT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HATE_SPEECH","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_HARASSMENT","probability": "NEGLIGIBLE"},{"category": "HARM_CATEGORY_DANGEROUS_CONTENT","probability": "NEGLIGIBLE"}]}]} | ||
|
||
{ | ||
"error": { | ||
"code": 499, | ||
"message": "The operation was cancelled.", | ||
"status": "CANCELLED", | ||
"details": [ | ||
{ | ||
"@type": "type.googleapis.com/google.rpc.DebugInfo", | ||
"detail": "[ORIGINAL ERROR] generic::cancelled: " | ||
} | ||
] | ||
} | ||
} |
File renamed without changes.
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
1 change: 0 additions & 1 deletion
1
Tests/GoogleAITests/SampleResponses/EmptyContentStreamingResponse.json
This file was deleted.
Oops, something went wrong.
17 changes: 0 additions & 17 deletions
17
Tests/GoogleAITests/SampleResponses/ExampleErrorMidStream.json
This file was deleted.
Oops, something went wrong.