Skip to content

Commit b689573

Browse files
Fix PrivateEndpoint.raw_predict parameter name
Fixes #6101 Changed parameter name from 'body' to 'data' in PrivateEndpoint.raw_predict to match google-auth-transport's AuthorizedSession.post() API signature. The google-auth-transport library updated its API, changing the parameter name from 'body' to 'data'. The Endpoint class was already updated to use 'data', but PrivateEndpoint class was missed, causing TypeError when calling raw_predict() on PrivateEndpoint instances. This fix aligns PrivateEndpoint.raw_predict() with Endpoint.raw_predict() implementation. Signed-off-by: Yashwant Bezawada <[email protected]>
1 parent ed53c69 commit b689573

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

google/cloud/aiplatform/models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4150,7 +4150,7 @@ def raw_predict(
41504150
url = f"https://{endpoint_override}/v1/projects/{self.project}/locations/{self.location}/endpoints/{self.name}:rawPredict"
41514151
return self._authorized_session.post(
41524152
url=url,
4153-
body=body,
4153+
data=body,
41544154
headers=headers,
41554155
)
41564156

0 commit comments

Comments
 (0)