Skip to content

Commit

Permalink
fixed type errors
Browse files Browse the repository at this point in the history
  • Loading branch information
tinalenguyen committed Jan 4, 2025
1 parent 2e37935 commit 4bf09b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ class ServerVad(TypedDict):
threshold: NotRequired[float]
prefix_padding_ms: NotRequired[int]
silence_duration_ms: NotRequired[int]
create_response: bool


class FunctionTool(TypedDict):
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")
metadata = (response.get("metadata")).json()

new_response = RealtimeResponse(
id=response["id"],
Expand Down Expand Up @@ -1643,8 +1643,8 @@ 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")
response.output = response_data.get("output")
response.metadata = (response_data.get("metadata")).json()
response.output = cast(list[RealtimeOutput], response_data.get("output"))
response.usage = response_data.get("usage")

metrics_error = None
Expand Down

0 comments on commit 4bf09b0

Please sign in to comment.