Skip to content

Commit

Permalink
added metadata var to response
Browse files Browse the repository at this point in the history
  • Loading branch information
tinalenguyen committed Jan 4, 2025
1 parent 4bf09b0 commit a50459c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,7 @@ class Response(TypedDict):
status: ResponseStatus
status_details: NotRequired[ResponseStatusDetails | None]
output: list[Resource.Item]
metadata: map | None
usage: NotRequired[Usage | None]


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1461,7 +1461,7 @@ def _handle_response_created(
response = response_created["response"]
done_fut = self._loop.create_future()
status_details = response.get("status_details")
metadata = (response.get("metadata")).json()
metadata = response.get("metadata")

new_response = RealtimeResponse(
id=response["id"],
Expand Down Expand Up @@ -1643,7 +1643,7 @@ def _handle_response_done(self, response_done: api_proto.ServerEvent.ResponseDon

response.status = response_data["status"]
response.status_details = response_data.get("status_details")
response.metadata = (response_data.get("metadata")).json()
response.metadata = response_data.get("metadata")
response.output = cast(list[RealtimeOutput], response_data.get("output"))
response.usage = response_data.get("usage")

Expand Down

0 comments on commit a50459c

Please sign in to comment.