-
Notifications
You must be signed in to change notification settings - Fork 650
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
VertexAI stop serializing unset fields into event
- Loading branch information
Showing
6 changed files
with
151 additions
and
6 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
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
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
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
108 changes: 108 additions & 0 deletions
108
...trumentation-vertexai/tests/cassettes/test_preview_generate_content_all_input_events.yaml
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,108 @@ | ||
interactions: | ||
- request: | ||
body: |- | ||
{ | ||
"contents": [ | ||
{ | ||
"role": "user", | ||
"parts": [ | ||
{ | ||
"text": "My name is OpenTelemetry" | ||
} | ||
] | ||
}, | ||
{ | ||
"role": "model", | ||
"parts": [ | ||
{ | ||
"text": "Hello OpenTelemetry!" | ||
} | ||
] | ||
}, | ||
{ | ||
"role": "user", | ||
"parts": [ | ||
{ | ||
"text": "Address me by name and say this is a test" | ||
} | ||
] | ||
} | ||
], | ||
"systemInstruction": { | ||
"role": "user", | ||
"parts": [ | ||
{ | ||
"text": "You are a clever language model" | ||
} | ||
] | ||
} | ||
} | ||
headers: | ||
Accept: | ||
- '*/*' | ||
Accept-Encoding: | ||
- gzip, deflate | ||
Connection: | ||
- keep-alive | ||
Content-Length: | ||
- '548' | ||
Content-Type: | ||
- application/json | ||
User-Agent: | ||
- python-requests/2.32.3 | ||
method: POST | ||
uri: https://us-central1-aiplatform.googleapis.com/v1beta1/projects/fake-project/locations/us-central1/publishers/google/models/gemini-1.5-flash-002:generateContent?%24alt=json%3Benum-encoding%3Dint | ||
response: | ||
body: | ||
string: |- | ||
{ | ||
"candidates": [ | ||
{ | ||
"content": { | ||
"role": "model", | ||
"parts": [ | ||
{ | ||
"text": "OpenTelemetry, this is a test.\n" | ||
} | ||
] | ||
}, | ||
"finishReason": 1, | ||
"avgLogprobs": -1.1655389850299496e-06 | ||
} | ||
], | ||
"usageMetadata": { | ||
"promptTokenCount": 25, | ||
"candidatesTokenCount": 9, | ||
"totalTokenCount": 34, | ||
"promptTokensDetails": [ | ||
{ | ||
"modality": 1, | ||
"tokenCount": 25 | ||
} | ||
], | ||
"candidatesTokensDetails": [ | ||
{ | ||
"modality": 1, | ||
"tokenCount": 9 | ||
} | ||
] | ||
}, | ||
"modelVersion": "gemini-1.5-flash-002", | ||
"createTime": "2025-02-03T22:15:35.089616Z", | ||
"responseId": "B0ChZ5C8BbXInvgP19PTyA4" | ||
} | ||
headers: | ||
Content-Type: | ||
- application/json; charset=UTF-8 | ||
Transfer-Encoding: | ||
- chunked | ||
Vary: | ||
- Origin | ||
- X-Origin | ||
- Referer | ||
content-length: | ||
- '715' | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
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